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

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Re: Creating adjusted survival plots using PROC SURVEYPHREG?

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

☑ This topic is **solved**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 03-17-2021 04:24 PM
(775 views)

Hello,

Does anyone know of a method to create survival curve plots using PROC SURVEYPHREG?

The BASELINE statement does not seem to work in PROC SURVEYPHREG, nor is the PLOTS=xxxx option available.

I was hoping to create adjusted survival plots from my Cox PH model from PROC SURVEYPHREG, but is this not possible in SAS?

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

We have a SAS Note available on this issue:

Usage Note 45197: How can I obtain survival estimates from PROC SURVEYPHREG?

http://support.sas.com/kb/45/197.html

Here is some additional information about the BASELINE statement from the SURVEYPHREG developer

==========================================================================================

PROC SURVEYPHREG cannot be used to produce survival estimates (or hazard estimates which aren't available with PHREG either) at this time. The BASELINE statement, typical of PROC PHREG, is not available in PROC SURVEYPHREG at this time.

If the objective is to compute the estimated survival function then PROC PHREG with the WEIGHT statement can be used. However, if the standard errors of the estimated survival are required then PROC PHREG should not be used. So, In other words, the survival point estimates using PROC PHREG are fine, but the standard errors are not.

Estimation of the standard error for the estimated survival for survey data is not straightforward. It is not impossible, but substantial work both theoretical and computational are required. Therefore we decided to wait for users response before working on this feature. We are researching this feature but we need to fully understand the estimation of the standard errors for estimated survival for complex surveys before introducing such capability into PROC SURVEYPHREG.

==========================================================================================

2 REPLIES 2

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

We have a SAS Note available on this issue:

Usage Note 45197: How can I obtain survival estimates from PROC SURVEYPHREG?

http://support.sas.com/kb/45/197.html

Here is some additional information about the BASELINE statement from the SURVEYPHREG developer

==========================================================================================

PROC SURVEYPHREG cannot be used to produce survival estimates (or hazard estimates which aren't available with PHREG either) at this time. The BASELINE statement, typical of PROC PHREG, is not available in PROC SURVEYPHREG at this time.

If the objective is to compute the estimated survival function then PROC PHREG with the WEIGHT statement can be used. However, if the standard errors of the estimated survival are required then PROC PHREG should not be used. So, In other words, the survival point estimates using PROC PHREG are fine, but the standard errors are not.

Estimation of the standard error for the estimated survival for survey data is not straightforward. It is not impossible, but substantial work both theoretical and computational are required. Therefore we decided to wait for users response before working on this feature. We are researching this feature but we need to fully understand the estimation of the standard errors for estimated survival for complex surveys before introducing such capability into PROC SURVEYPHREG.

==========================================================================================

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Is it possible to plot splines with proc surveyphreg? I've tried multiple variations of this code but always get the same error message:

ERROR: Nesting of continuous variable not allowed.

Thank you

Sophie

```
proc surveyphreg data=work.nhanes;
model time*death(0) = spline(x / knotmethod=percentiles 4);
spline x / hazard=exp;
strata SDMVSTRA;
cluster SDMVPSU;
weight WTMEC8YR;
run;
```

**Available on demand!**

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

What is ANOVA?

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.