proc glm data=outmi;
by _imputation_;
class TRT02PN;
model W24CHG=TRT02PN/solution;
means TRT02PN /hovtest=leven(type=abs);
ods output ParameterEstimates=coeff;
run;
I am trying to obtain variance covariance matrix of the Estimates and don't know what line of code I should you.
Home > Analytics > Stat Procs > Covariance of Coefficients
https://communities.sas.com/t5/Statistical-Procedures/Covariance-of-Coefficients/td-p/409714
Koen
What do you see when you add the inverse option to the model statement:
proc glm data=outmi;
by _imputation_;
class TRT02PN;
model W24CHG=TRT02PN/solution inverse;
means TRT02PN /hovtest=leven(type=abs);
ods output ParameterEstimates=coeff;
run;
And sometimes it is easier to step away from GLM and try something like this:
proc glimmix data=outmi;
by _imputation_;
class TRT02PN;
model W24CHG=TRT02PN/solution covb;
ods output ParameterEstimates=coeff covb=covb;
run;
This is solely to get the covariance matrix for the fixed effects, and not to combine the imputations.
SteveDenham
Thanks for sharing. I wonder how do we get the variance-covariance matrix of regression coefficients? Thanks.
You could try COVB option:
proc glimmix data=sashelp.heart ;
class sex;
model status=weight height sex/dist=binary corrb covb;
run;
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.