0
$\begingroup$

My question is about survival analysis, but I am quite sure that it may apply to regression in general.

I will stick with a very simple simulation for survival times. For example, let's simulate the survival times for 100 subjects from a Weibull distribution $S \sim W (\alpha, \lambda)$, where 1000 covariates/predictors are introduced through $\lambda = x_i \beta$; censoring times are independently drawn from an exponential distribution $C \sim Exp(\mu)$; and the observed times $(T)$ are set to be $T_i = min(S_i, C_i)$.

X = matrix(rnorm(1000*100, mean = 0, sd = 1),ncol=  1000)
beta = rnorm(1000, sd = 10) 
survdata <- data.frame(surv_months = rweibull(n = 100,
                  a = 0.8 , b = exp(- (X %*% beta) /0.8)),
                  censor_months = rexp(n = 100, rate = 1/100),
                  stringsAsFactors = F   ) %>%
   dplyr::mutate(os_status = ifelse(surv_months < censor_months,
                                     'DECEASED', 'LIVING'
     ),
    os_months = ifelse(surv_months < censor_months,
                        surv_months, censor_months
     )

And this is what results: the survival time for some individuals is extremely short, while others have extreme long survival.

enter image description here

While I would like to obtain instead is the survival times one can get by simulating with the same function, but with only two features/predictors/covariates instead. For example:

X = matrix(rnorm(2*100, mean = 0, sd = 1),ncol=  2)
    beta = rnorm(2, sd = 10) 
    survdata <- data.frame(surv_months = rweibull(n = 100,
                      a = 0.8 , b = exp(- (X %*% beta) /0.8)),
                      censor_months = rexp(n = 100, rate = 1/100),
                      stringsAsFactors = F   ) %>%
       dplyr::mutate(os_status = ifelse(surv_months < censor_months,
                                         'DECEASED', 'LIVING'
         ),
        os_months = ifelse(surv_months < censor_months,
                            surv_months, censor_months
         )

And the plot:

enter image description here

$\endgroup$
  • 1
    $\begingroup$ What exactly is your question? Eg, I don't see a "?" anywhere. $\endgroup$ – gung - Reinstate Monica Apr 30 '18 at 17:43
  • $\begingroup$ Oh sorry, my question is why when using a large number of normally distributed predictors we don't get a stable linear predictor? $\endgroup$ – Carlos ST Apr 30 '18 at 18:56
  • $\begingroup$ (I think this is probably appropriate here.) What do you mean by "a stable linear predictor"? Are you wondering why the observed survival times don't converge onto a single number (ie., why they seem to spread out over a wide range of times)? $\endgroup$ – gung - Reinstate Monica Apr 30 '18 at 19:27
  • $\begingroup$ Hi gung thanks. Yes I mean that when using a large number of covariates, (although I think they should cancel out because they are drawn from a normal distribution), for many individuals it gives a sum of the linear combination that destabilise the survival. $\endgroup$ – Carlos ST Apr 30 '18 at 21:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.