12-03-2013 12:31 PM
I am using proc mixed for a longitudinal dataset. In the null model (aka the model with just household id in the class category and no covariates) the intercept in the random effects is 0. What does this mean? Am I doing something wrong? I am not getting error messages but wanted to compare the reduction in btwen and w/I group variance in my subsequent models with additional controls and cannot do this if it is zero to begin with. I can look at a reduction in AIC in each model but that still does not seem enough.
Thanks for any suggestions,
OISE, University of Toronto
12-03-2013 03:00 PM
It's really basic and I've used before... everything else in the model looks normal to me besides the random effects intercept.
proc mixed data=lsic.transpose method=ml covtest;
model wage = householdid / s;
repeated / type=un subject=householdid;
12-03-2013 03:13 PM
In mixed models we have :
Y = X*Beta + Z*Gamma + E
In your model , you don't have G-side (with random statement ) . It means you don't have Z*Gamma. The R-side effect is specified with repeated statement.
12-04-2013 08:32 AM
What that zero says is that the repeated nature of the measurements accounts for all the variability, leaving none for the averaged effect of household_id. This happens a fair amount if there is not enough data to support all of the covariance parameters specified using type=UN. How many records, and how many covariance parameters are being estimated?
12-04-2013 08:39 AM
Thanks for your response. I do have several thousand records (3 for each individual with a sample of over 2000 people) and as for covariance parameters - this is the model with ONLY household ID in it so there are no other variables included in the model. Is there anyone to change/adjust this?
12-04-2013 08:49 AM
What I think is going on with the current model: It is fitting household_id as both a subject effect and as a fixed effect. After you remove the fixed effect variance under ML, there is nothing going on for repeated measures. My problem is that I don't see this as fitting a repeated measures analysis. If you have repeated measures on each household_id, you need to identify them somehow as an effect, and include it both in the model statement and in the repeated statement. For instance, if each household_id was measured three times, or there were, say, three individuals in the household, then time or rep need to be included in the model.
Conversely, if you change the repeated statement to a random statement, and removed the type=un, it would give the variance component due to a random intercept for household_id, which is what I think you are trying for.
12-16-2013 05:59 PM
Hi again and thank you very much for your help,
My syntax currently looks like this:
proc mixed noclprint noitprint data = lsic method = ml covtest;
model wage = t / solution ddfm = bw;
random intercept t/ sub = hhldid;
However the intercept in the random effects is still 0!! Do you have any suggestions?
Thanks very much,
12-17-2013 01:15 PM
The random effects are fit from the most "complex" to the simplest, so the variance component due to t*hhldid explains all of the variance under the weighting scheme you have specified. Note that the weight statement transforms both the X'X and Z'Z matrices to X'WX and Z'WZ, so there is a possibility that the scaled weight is such that it removes the variation due solely to household, but not due to household*t.
What is "t" in the model? It looks to be a continuous variable, such that you are doing a random regression. Is that correct? How many values does t take on, and what is the range?
12-17-2013 02:49 PM
What is the weight, and how is it calculated, followed by how is the rescaled weight calculated?
(I have a feeling we may be dealing with survey data here, and we may need to shift procedures. The answers to those questions will help clarify this.)
12-17-2013 09:37 PM
It is survey data and is just rescaled to have a mean of 1. As I understand it, I cannot use the non-scaled weight for this data - better to use no weight.
Am I using the wrong procedure?
12-18-2013 01:08 PM
PROC SURVEYREG may be much more applicable. In particular, look at Examples 94.7 (Domain Analysis) and 94.8 (Comparing Domain Statistics). With weights in hand, I think this is a better approach to your data.