Hello!
I am trying to pool my effect estimates across my imputed datasets using a 3-level logistic regression using GLIMMIX. However, only my class variable effect estimates are saving.
Here is my current code:
proc glimmix data=lpa method=rspl noclprint;
class idschl jclass mhserv (Ref=first) class_mem (ref=first) female(ref=first) black (ref=first)
esa (ref=first) other (Ref=first);
model mhserv=class_mem female age esa black other assets/CL dist=binary link=logit solution ddfm=bw;
by _imputation_;
random intercept/ type=un subject=idschl;
random intercept/Type=un subject=jclass (idschl);
ods output solutionf=imputeout;
run;
quit;
**THESE RUN PROPERLY**
PROC DATASETS NOLIST NODETAILS;
CONTENTS DATA=imputeout ;
RUN;
**THS DATASET ONLY CONTAINS EFFECT ESTIMATES THAT APPEARED IN THE CLASS LINE**
proc mianalyze parms=a_mvn;
class idschl jclass mhserv class_mem female black
esa other;
modeleffects intercept class_mem female age esa black other assets;
STDERR class_mem;
run;
**THIS DOESN'T WORK BECAUSE EFFECT ESTIMATES FOR assets and age ARE NOT SAVED**
Thanks in advance!
When you use a PARMS= data set for input, you should not use the STDERR statement. All you need is the MODEFFECTS statement.
It would be helpful to see the LOG messages you get from the two procedures as well as a snippet of the output from GLIMMIX that shows the parameters.
Hi Rob,
These are the variables saved in imputeout. As you can see, no continuous variable parameters are saved so therefore there is nothing to pool on the subsequent command.
13 | Alpha | Num | 8 | BEST6. | |
10 | DF | Num | 8 | BEST5. | |
2 | Effect | Char | 9 | ||
8 | Estimate | Num | 8 | D8.4 | |
14 | Lower | Num | 8 | D8.4 | |
12 | Probt | Num | 8 | PVALUE6.4 | Pr > |t| |
9 | StdErr | Num | 8 | D8.4 | Standard Error |
15 | Upper | Num | 8 | D8.4 | |
1 | _imputation_ | Num | 8 | ||
5 | black | Num | 8 | BEST. | |
3 | class_mem | Num | 8 | BEST. | |
6 | esa | Num | 8 | BEST. | |
4 | female | Num | 8 | BEST. | |
7 | other | Num | 8 | BEST. | |
11 | tValue | Num | 8 | 7.2 | t Value |
It seems you are right, but figuring out why without the GLIMMIX output and LOG containing all the code would be practically impossible.
See attached for the log output from the "by _imputation_" run.
Let me know your thoughts! Thanks so much.
I have been having the same issues with ParameterEstimates as well. See attached. I did my imputation in BLIMP - an external 3-level multi-level imputation software - so the actual MI was not done in SAS. However, I renamed the imputation variable the same as the SAS default and it is producing accurate estimates in the stratified analyses.
Thanks again, I really appreciate your time.
I realized I had some errors in the last code. See attached for an updated. Same issue but I figured out what is going on (just not how to fix it). The results of my imputation are saving for each variable but where each variable and each imputation is listed as an observation. The headings/variable labels are related to the classes (to indicate the coding for that effect estimate), followed by the estimate, standard error, degrees of freedom, etc. So the continuous effects are being saved but as an observation and not as a heading.
When you use a PARMS= data set for input, you should not use the STDERR statement. All you need is the MODEFFECTS statement.
Great! That worked thank you so much.
Jillian
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.