Programming the statistical procedures from SAS

Survival Analyis Time Dependent Covariates

Posts: 29

Survival Analyis Time Dependent Covariates



I have the following two questions related to the modelling that I am doing at present:


  1. Cox PH regression with time varying covariates – When run in SAS, it produces a note. This means that when a modelling variable is time dependent, the probabilities that the regression produces haven’t taken into account for the time varying nature of the modelling variable, thus, they aren’t fully accurate. These probabilities are calculated using the simple equation S(t) = S(0) ^ EXP(Beta*X) but mathematically, the integration is not simple when X; the modelling variable is a function of time. However, in R, using survfit with coxph object, we can get the accurate probabilities.

NOTE: Since the counting process style of response was specified in the MODEL statement, the SURVIVAL= statistics in the BASELINE

statement should be used with caution.


         Is there a way out to get correct survival prob in SAS whilst using TVC's?


  1. Curve fitting to a Kaplan Meier Estimator – This is a step function and I want to fit an exponential curve to it by not regressing it / fitting a curve to the pdf/ cdf (so proc univariate, etc. are ruled out) but by fitting the curve to the actual values of the data points. For example, the graph attached is a step function (KM estimator of survival probabilities) and I have tried fitting an exponential curve of the form EXP(-lambda*t) to the actual values of the step function. The fit gives me the correct “lambda estimate” of the survival curve. This has been done in R using numerical integration to find the lambda that minimises
    the area between the step function and fitted curve.


Ask a Question
Discussion stats
  • 0 replies
  • 1 in conversation