R – {survRM2}
|
SAS – PROC RMSTREG
|
|||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Estimate | SE | 95% CI | z | p | Estimate | SE | 95% CI | Chi-Square | p | |
| Intercept | 380.8065 | 48.9428 | 284.8804, 476.7327 | 7.7806 | 0.0000 | 308.8065 | 48.9428 | 284.8804, 476.7327 | 60.54 | < 0.0001 |
| trt01p-2 | −9.8835 | 14.8654 | -39.0192, 19.2521 | −0.6649 | 0.5061 | −9.8835 | 14.8654 | -39.0192, 19.2521 | 0.44 | 0.5061 |
| sex-M | −54.2552 | 15.5813 | -84.7940, -23.7163 | −3.4821 | 0.0005 | −54.2552 | 15.5813 | -84.7940, -23.7163 | 12.12 | 0.0005 |
| age | −1.3874 | 0.7904 | -2.9366, 0.1618 | −1.7553 | 0.0792 | −1.3874 | 0.7904 | -2.9366, 0.1618 | 3.08 | 0.0792 |
R vs SAS - Restricted Mean Survival Time (RMST)
Comparison of R vs SAS
The following table lists the methods for RMST analysis in R and SAS.
| Method | Supported in R | Supported in SAS | Results Match | Notes |
|---|---|---|---|---|
| 1. Inverse probability censoring weighting (IPCW) | Yes - survRM2 |
Yes - PROC RMSTREG | Yes | survRM2 allows only 2 strata |
| 2. Pseudo-value estimation | Yes - survival + geepack |
Yes - PROC RMSTREG | Yes | |
| 3. Area under the curve | Yes - survRM2 |
Yes - PROC LIFETEST | Yes |
Results from the examples shown for R here and SAS here were compared below.
Method 1: Inverse probability censoring weighting (IPCW)
Comparing the identity-link results side-by-side, the RMST estimates, standard errors (SEs), confidence intervals (CIs) and p-values match exactly across R and SAS.
The same is true of the RMST ratios (computed with the log-link function). Note that survRM2 provides exponentiated versions of the CI values, whereas SAS provides them on the log scale.
R – {survRM2}
|
SAS – PROC RMSTREG
|
|||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Estimate | SE | 95% CIa | z | p | Estimate | SE | 95% CI | Chi-Square | p | |
| Intercept | 6.0191 | 0.1888 | 5.6491, 6.3892 | 31.8783 | 0.0000 | 6.0191 | 0.1888 | 5.6491, 6.3692 | 1,016.23 | < 0.0001 |
| trt01p-2 | −0.0367 | 0.0575 | -0.1493, 0.0760 | −0.6381 | 0.5234 | −0.0367 | 0.0575 | -0.1493, 0.0760 | 0.41 | 0.5234 |
| sex-M | −0.2085 | 0.0605 | -0.3271, -0.0899 | −3.4463 | 0.0006 | −0.2085 | 0.0605 | -0.3271, -0.0899 | 11.88 | 0.0006 |
| age | −0.0054 | 0.0031 | -0.0115, 0.0007 | −1.7348 | 0.0828 | −0.0054 | 0.0031 | -0.0155, 0.0007 | 3.01 | 0.0828 |
| a Default exponentiated CI values have been log-transformed. | ||||||||||
If needed, the exponentiated CI values returned by survRM2 can simply be log-transformed:
# Get log CIs from survRM2 object `RMST.comp1`
logCIs <- log(RMST.comp1$RMST.ratio.adjusted[, 6:7])
round(logCIs, digits = 4) # Display rounded to 4 decimal places lower .95 upper .95
intercept 5.6491 6.3892
arm -0.1493 0.0760
sexM -0.3271 -0.0899
age -0.0115 0.0007
Method 2: Pseudo-value estimation
The R vs SAS comparison of this method is yet to be completed.
Method 3: Area under the curve
For the RMST of individual strata, both R and SAS return RMST estimates with SEs, and survRM2 additionally provides confidence intervals. Both R and SAS return the RMST difference between the two strata. For the variance of the difference, SAS provides the SE, whereas survRM2 provides CI values.
R – {survRM2}
|
SAS – PROC RMSTREG
|
|||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Estimate | SE | 95% CI | z | p | Estimate | SE | 95% CI | Chi-Square | p | |
| Stratum 1 | 248.2156 | 9.2343 | 230.1166, 266.3146 | – | – | 248.2156 | 9.2343 | – | – | – |
| Stratum 2 | 272.9520 | 11.9889 | 249.4542, 296.4499 | – | – | 272.9520 | 11.9889 | – | – | – |
| Difference | −24.7364 | 15.1330a | -54.3965, 4.9237 | – | 0.1021 | −24.7364 | 15.1330 | – | 2.6719 | 0.1021 |
| a Derived from the estimate and lower CI. | ||||||||||
If needed, the SE of the RMST difference for the survRM2 output can be easily inferred from the (Wald) CI by subtracting the lower CI from the mean and dividing the result by a percentile of a standard normal distribution, e.g., the 97.5th percentile for the default 95% confidence level:
# Get SE of RMST difference from survRM2 object `RMST.comp4`
RMSTdiffSE <- (RMST.comp4$unadjusted.result[1,1] - RMST.comp4$unadjusted.result[1,2])/
qnorm(p = 0.975, mean = 0, sd = 1)
round(RMSTdiffSE, digits = 4) # Display rounded to 4 decimal places[1] 15.133