turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Interpreting LSMEANS in PROC PHREG

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-09-2012 10:22 AM

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:

Margins | By Level | Estimate | Standard Error | z Value | Pr > |z| | Mean | Standard Error of Mean | Exponentiated | |

1 | WORK.PROSPECT | Yes | -10.7585 | 6.2441 | -1.72 | 0.0849 | -10.7585 | 6.2441 | 0.000021 |
---|---|---|---|---|---|---|---|---|---|

2 | WORK.PROSPECT | Yes | -10.9224 | 6.2676 | -1.74 | 0.0814 | -10.9224 | 6.2676 | 0.000018 |

3 | WORK.PROSPECT | Yes | -11.2333 | 6.2740 | -1.79 | 0.0734 | -11.2333 | 6.2740 | 0.000013 |

4 | WORK.PROSPECT | Yes | -11.3222 | 6.2734 | -1.80 | 0.0711 | -11.3222 | 6.2734 | 0.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!