is it possible to output predicted individual-level slopes from proc mixed? Here is my current code. Thanks!
proc mixed data=all covtest cl;
class ptID;
model value=visitYr / s residual outp=pred;
random int visitYr / type=un subject=ptID g gcorr v;
ods output CovParms=covout solutionr=slopes;;
run;
See if this post is helpful: https://communities.sas.com/t5/Statistical-Procedures/predicted-value-proc-mixed/td-p/56468
Show us some of this solutionr=slopes
@Abishekaa wrote:
is it possible to output predicted individual-level slopes from proc mixed? Here is my current code. Thanks!
proc mixed data=all covtest cl; class ptID; model value=visitYr / s residual outp=pred; random int visitYr / type=un subject=ptID g gcorr v; ods output CovParms=covout solutionr=slopes;; run;
You could use SOLUTION option of RANDOM to get them.
proc mixed data=sashelp.heart(obs=1000) covtest cl;
class bp_status;
model weight=height / s residual outp=pred;
random int height / type=un subject=bp_status g gcorr v solution;
ods output CovParms=covout solutionr=slopes;;
run;
The SOLUTION option on the RANDOM statement gives you the random deviation of each individual's slope from the overall slope. The overall slope comes from the coefficient for HEIGHT given in the S option for the MODEL statement. To get individual slopes, combine the results of the S option on the RANDOM statement and the S option on the MODEL statement.
The following usage note provides sample programs for obtaining subject-specific intercept and slope --
http://support.sas.com/kb/37109
The following note shows how to plot these subject-specific models --
http://support.sas.com/kb/37110
Hope this helps,
Jill
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.