Programming the statistical procedures from SAS

Interpreting LSMEANS in PROC PHREG

Reply
Contributor
Posts: 23

Interpreting LSMEANS in PROC PHREG

I'm having some difficulty figuring out how to interpret the output of LSMEANS in PROC PHREG, and was hoping someone could refresh my memory and/or help me out.

My data has one row per subject, with discrete time periods for each subject (ranging from 1 to 7), and is right-censored (some subjects dropped out before experiencing an event). The variable TimeTo1stEvent capturing the time period when they experienced the first event, AnyEventFlag as the censoring variable (1 if they had an event, 0 otherwise), EntryType (1 to 4) and SubjType (1 to 3) are categorical variables, and the other explanatory variables in the MODEL statement below are continuous variables. I also have a variable TotalNumPeriods that captures for how many periods we have data on a subject. For subjects who didn't experience an event, I had set AnyEventFlag=0 and TimeTo1stEvent=TotalNumPeriods.

(As an aside, I wasn't sure how, if at all, to incorporate TotalNumPeriods into the code, but I didn't think I needed to.)

My code is:

proc phreg data=Prospect ;

class AnyEventFlag EntryType SubjType / param=glm ;

model TimeTo1stEvent*AnyEventFlag(0) = EntryType SubjType Age_At_Entry GP MP1 MP2 / type3 ;

hazardratio EntryType / diff=all ;

lsmeans EntryType / means diff ilink exp bylevel plots=none ;

lsmeans EntryType / means diff ilink exp om plots=none ;

lsmeans EntryType / means diff ilink exp bylevel om plots=none ;

run;

I'm interested in what the marginal means are for each category of EntryType, controlling for the other explanatory variables.

The results I get from the first LSMEANS statement are:

EntryType
MarginsBy LevelEstimateStandard Errorz ValuePr > |z|Mean

Standard Error

of Mean

Exponentiated
1WORK.PROSPECTYes-10.75856.2441-1.720.0849-10.75856.24410.000021
2WORK.PROSPECTYes-10.92246.2676-1.740.0814-10.92246.26760.000018
3WORK.PROSPECTYes-11.23336.2740-1.790.0734-11.23336.27400.000013
4WORK.PROSPECTYes-11.32226.2734-1.800.0711-11.32226.27340.000012

And the results from the next two LSMEANS statements are fairly similar.

What I'm trying to get is something like the expected Time to Event for EntryType=1 is X.XX number of periods, for EntryType=2 is Y.YY number of periods, etc. For some reason, I can't figure out how to take the values in the Estimate column (or any other info SAS spits out) and translate those to what I'm looking for. Using PROC LIFEREG I can create an output dataset and specify "QUANTILES=0.5" to get a quantile estimate for each subject in the data, but not an overall estimate for each value of EntryType.

I also had explored using the "TYPE=DISCRETE" option in the model statement, and a BASELINE statement, but neither seemed to be giving me what I was trying to get at.

Can anyone help me out and remind me how to get what I'm looking for?

Thanks!

Ask a Question
Discussion stats
  • 0 replies
  • 546 views
  • 0 likes
  • 1 in conversation