Questions tagged [survival]

Survival analysis compares the statistical strength of predictors for events encoded as occuring or censored in concert with a time variable. It can be parametric or non-parametric.

445 questions
1
vote
0 answers

Standard Error Median Survival Time SPSS

I would like to understand how the standard error for the median survival time is calculated in SPSS 19.0 I've looked at the Algorithms document…
user1375871
  • 1,199
  • 1
  • 12
  • 23
1
vote
1 answer

ggfortify doesn't support survfit multiple covariables?

The following example is modified from document example by adding "age" d.coxph <- (survfit(Surv(time, status) ~ sex+age, data = lung)) autoplot(d.coxph) I'll get the following error: Error in levels<-(*tmp*, value = if (nl == nL)…
hlu58
  • 115
  • 6
1
vote
1 answer

Syntax for survival analysis with late-entry

I am trying to fit a survival model with left-truncated data using the survival package however I am unsure of the correct syntax. Let's say we are measuring the effect of age at when hired (age) and job type (parttime) on duration of employment of…
llewmills
  • 2,959
  • 3
  • 31
  • 58
1
vote
0 answers

Compute the confidence interval of the hazard ratio of a survival regression model

I tried to get confident interval of hazard ratio in survreg() function, but it's not that straightforward as coxph. Call: survreg(formula = Surv(survival, DIED) ~ AGE + GENDER + PLATE + NEUTRO + NIH, data = IMRAWandIST, dist = "exponential") …
1
vote
0 answers

SAS: plot number still surviving by # days

Given data with a number-of-days-to-event, and an outcome, like so: data pretend ; do subject = 1 to 1000 ; fup_time = round(uniform(83386)*500, 1) ; select(round(uniform(778523)*5, 1)) ; when(1) outcome = 'cholys' ; …
Roy Pardee
  • 196
  • 2
  • 12
1
vote
1 answer

Creating Count Process Data Set With Time-Varying Covariates in R

I am working through Chapter 15 of Applied Longitudinal Data-Analysis by Singer and Willett, on Extending the Cox Regression model, but the UCLA website here has no example R code for this chapter. I am trying to re-create the section on…
llewmills
  • 2,959
  • 3
  • 31
  • 58
1
vote
0 answers

How to use predictSurvProb() in package "pec" to predict survival probabilities for dataset with time-dependent covariates?

I have a dataset as below: Patient_ID Time_Start Time_End X1 X2 X3 Status 001 0 1 0 001 1 2 0 001 2 3 0 001 3 4 …
soniCYouth
  • 33
  • 1
  • 8
1
vote
0 answers

Large Dataframe slow with Lifelines Survival Analysis

I'm trying to run a survival analysis on a large dataset (about 80 rows x 12,000 cols) in python. Currently I'm using: from lifelines import CoxPHFitter cf = CoxPHFitter() cf.fit(df, duration_col='Time', event_col='Status') But it is extremely…
zhivaga
  • 11
  • 3
1
vote
1 answer

Survdiff Loop - P values

I'm trying to subset my current data frame with a new data frame that lists genes I'm investigating in one column and p-values in another (for each gene). I have a data frame called m3 that looks like below: Sample # BRCA TP53 …
Matt
  • 17
  • 1
  • 5
1
vote
0 answers

Plotting all-time risk of a variable with ggplot2 after adjusting a survival model

I am working with survival analysis and the smoothHR package, after modeling I'd like to plot the relative risk vs a variable, thing that is quite easy with plot(dataset, predictor) But I'd like to do it using the ggplot package. Any idea how…
Dario.gs
  • 65
  • 4
1
vote
1 answer

Like dcast but without sum of data

I have data organized for the R survival package, but want to export it to work in Graphpad Prism, which uses a different structure. #Example…
Crawdaunt
  • 89
  • 1
  • 12
1
vote
0 answers

Confidence interval of a product in coxph

I'm using coxph for a survival model, using three cualitative variables as independent. I know there is not an interaction between them so I just did the following model: fit <- coxph(Surv(Time, status) ~ factor(v1) + factor(v2) + factor(v3) My…
J Louro
  • 33
  • 1
  • 7
1
vote
1 answer

Including function from "survival" in R package

I would like to include in my R package a new function, which requires the Surv function from the survival package. I did include import(survival) in the NAMESPACE and I have survival installed; however, when I run R CMD check, I still get this…
1
vote
0 answers

Survival Analysis Data with country-year observations

I'm trying to fit a Cox Proportional Hazard model to analyze the impact of the number of protest events on the survival rates of different political regimes in different countries. My dataset looks similar to this: Country year sdate …
1
vote
1 answer

Competing risks regression in Stata - stset and the competing failure

I am using Stata and completing a competing risks regression with secondary cancer diagnosis as the failure and death as a competing risk. I am not sure if I am using the stset command correctly. The code I am using is this:- stset diagtime,…
sophierw
  • 11
  • 1