I have a competing risks model using phreg and am trying to find the group means through lsmeans. I'm not sure I understand the results; the estimates are incredibly small (or negative if I include control variables in the model) compared to the actual group means when I run the same model through proc glimmix as a linear regression model. The outcome is hospital length of stay. Here is some of the code:
proc phreg data=cif_icp_crani;
class group / param=glm order=internal ref=last;
model los_adj*outcome(0) = group / rl eventcode=1;
format group groupf.;
hazardratio group / diff=pairwise;;
lsmeans group / means exp cl;
run;
proc glimmix data=cif_icp_crani;
class group;
model los_adj = group;
lsmeans group;
run;
Can someone please explain to me what the lsmeans output in a phreg model actually means and why the estimates are so different than what the actually group means are? Thank you.
A comparison of the lsmeans output from the two PROCs would be useful to check whether the difference can be explained by the scale on which the models are operating. That is what I think is happening, but I could be WAAAAAY off.
SteveDenham
Thanks, Steve! Here is the output from the phreg model:
Group Least Squares Means | ||||||||||
Group | Estimate | Standard Error | z Value | Pr > |z| | Alpha | Lower | Upper | Exponentiated | Exponentiated Lower | Exponentiated Upper |
Medicaid MCO | 0.2717 | 0.06714 | 4.05 | <.0001 | 0.05 | 0.1401 | 0.4033 | 1.3122 | 1.1504 | 1.4968 |
Medicaid FFS | 0.2227 | 0.06518 | 3.42 | 0.0006 | 0.05 | 0.09491 | 0.3504 | 1.2494 | 1.0996 | 1.4197 |
Private Ins. | 0 | 0 | . | . | 0.05 | 0 | 0 | 1 | 1 | 1 |
Here is the output from the regression model:
Group Least Squares Means | |||||
Group | Estimate | Standard | DF | t Value | Pr > |t| |
Error | |||||
Medicaid FFS | 36.3212 | 1.3628 | 2074 | 26.65 | <.0001 |
Medicaid MCO | 29.9707 | 1.3407 | 2074 | 22.36 | <.0001 |
Private Ins. | 21.9483 | 1.2914 | 2074 | 17 | <.0001 |
And I am really off - it's not a scale thing. Maybe @SAS_Rob would be a good resource, or could at least point you to someone who is.
SteveDenham
I would say that there is really no fair way to compare the two models as they are now. PHREG is fitting a competing risks model with a very different likelihood function than GLIMMIX would fit (treating the response as having a normal LL by default).
This section of the documentation might be helpful in understanding some of the differences.
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.