The statement
estimate 's2: 1' int 1 | int 1 / subject 0 1 cl ilink e ;
only is of direct use if there are no fixed effects in the model (only the intercept). The statement can be used with factors or covariates, but the meaning is different in each case. In fact, this statement is likely not giving you what you want with fixed effects. By the way, it is useful to add an E option to these statements to see what GLIMMIX is doing, because the procedure fills in the blanks when the fixed effects are not explicitly given. For instance, with a continuous variable, the procedure is using 0 for X; this is meaningless for you, since the smallest value of your covariable is 36. I know you want to get a correction for fixed effects, but if there are fixed effects, then your EBLUPs really should be for specific values of the fixed effects. See my comments below on different variations of your possible model.
This estimate statement makes sense here without fixed effects. You get a logit of 0.564 and SE of 0.532). PROC glimmix data=school NOCLPRINT MAXLMMUPDATE=100 ; title 'no fixed effects'; class school school_type; model final_pass = / s cl dist=bin link=logit ; random intercept/ subject=school solution cl ; estimate 's2: 1' int 1 | int 1 / subject 0 1 cl ilink e ; run;
For all the runs from now on, I give the simple version of the BLUP statement (allowing for defaults in GLIMMIX), listed as "1", and then I give the exact same statement where the missing terms are explicitly given (listed as "1b"). That is the first two estimate statements give the exact same answer for each run. As you can see, the first estimate statement really is doing the calculation for entry_score=0 (an impossible value for this data set). You average value of the covariable is about 70, so I added an estimate statement with this value. You can see that one is now getting a similar EBLUP as found with no fixed effects. The SE is different. PROC glimmix data=school NOCLPRINT MAXLMMUPDATE=100 ; title 'only continuous fixed'; class school school_type; model final_pass = entry_score / s cl dist=bin link=logit ; random intercept/ subject=school solution cl ; estimate 's2: 1' int 1 | int 1 / subject 0 1 cl ilink e ; estimate 's2: 1b' int 1 entry_score 0 | int 1 / subject 0 1 cl ilink e; estimate 's2: X=70' int 1 entry_score 70 | int 1 / subject 0 1 cl ilink e; run;
Things are trickier with a factor (class variable). Your data set is not balanced -- there are about twice as many public as private schools. Note that here your first estimate statement really is giving the EBLUP for the LSMEAN of the two types of schools (1b) (this is not the marginal means because of the imbalance). You can kind of recover an EBLUP similar to the no-fixed-effect run by using the 0.16 and 0.84 coefficients for school type (1c estimate) (not same ratio as actual data because this model fitting is not for a linear model -- there is skewness that affects results).
I actually think you should be looking at EBLUPs for each school type, not trying to get a global shool type. I give those estimate statements.
PROC glimmix data=school NOCLPRINT MAXLMMUPDATE=100 ; title 'only categorical fixed'; class school school_type; model final_pass = school_type / s cl dist=bin link=logit ; random intercept / subject=school solution cl ; estimate 's2: 1' int 1 | int 1 / subject 0 1 cl ilink e ; *identical to next one; estimate 's2: 1b' int 1 school_type 0.5 0.5 | int 1 / subject 0 1 cl ilink e ; estimate 's2: 1c' int 1 school_type 0.16 0.84 | int 1 / subject 0 1 cl ilink e ; *^because of imbalance in numbers in two school types, coefficients are not equal above; estimate 's2: sch type 1' int 1 school_type 1 0 | int 1 / subject 0 1 cl ilink e; estimate 's2: sch type 2' int 1 school_type 0 1 | int 1 / subject 0 1 cl ilink e; run;
Thinks get even trickier with continuous and factor both in the model. As mentioned above, there is imbalance in observations in the two school types. Plus, the distribution of the continuous variable is not the same for the two school types. Thus, it is very hard to define a global type of central fixed effect. As you can see below, if you use the first estimate statement, you are getting the EBLUP for X=0 and the LSMEAN of the two school types (not the marginal means) (compare 1 and 1b results). Not a useful result. By trial and error, one can get a kind of central-fixed-effect EBLUP with the third estimate statement (1d). This is a bit strange because it is for X=36 (about the minimum observed X), and for the LSMEANS of the categorical variable. It is likely due to the combination of imbalance and different distributions for X. This is giving you about the same as the first run with no fixed effects. I would prefer if you got EBLUPs for each school type at the mean of the X (about 70). See these estimate statements.
PROC glimmix data=school NOCLPRINT MAXLMMUPDATE=100 ; title 'categorical and continuous fixed'; class school school_type; model final_pass = entry_score school_type / s cl dist=bin link=logit ; random intercept/ subject=school solution cl ; estimate 's2: 1' int 1 | int 1 / subject 0 1 cl ilink e ; estimate 's2: 1b' int 1 school_type 0.5 0.5 entry_score 0 | int 1 / subject 0 1 cl ilink e; *^X=0 is meaningless, but that is what you get with first estimate statement; estimate 's2: X=36 (1d)' int 1 school_type 0.5 0.5 entry_score 36 | int 1 / subject 0 1 cl ilink e; estimate 's2: sch typ 1 X=70' int 1 school_type 1 0 entry_score 70 | int 1 / subject 0 1 cl ilink e ; estimate 's2: sch typ 2 X=70' int 1 school_type 0 1 entry_score 70 | int 1 / subject 0 1 cl ilink e ; run;
Overall, as I stated in other posts, I don't think there is a good way of doing what you originally wanted. That is, I feel you need to be explicit for the fixed effects if they are in the model.
... View more