Tagged Questions
0
votes
1answer
42 views
Plotting the gap between two times
I have a (large) dataset where I know, for each observation, the departure and the arrival time of a worker (between 0 and 24, in decimal) :
...
0
votes
0answers
45 views
Large scale Cox regression with R (Big Data)
I am trying to run a Cox regression on a sample 2,000,000 row dataset as follows using only R. This is a direct translation of a PHREG in SAS. The sample is representative of the structure of the ...
1
vote
0answers
23 views
Extended Cox-model with ancillary variable
I have survival data (coming from a labor market) looking like this
...
0
votes
1answer
61 views
Test Cox proportional hazard assumption (Bad Schoenfeld residuals)
Using R I generated a Cox model looking like this
...
0
votes
1answer
74 views
How do you prepare longitudinal data for survival analysis?
I'm trying to plot a Kaplan-Meier curve of my data with R. Currently, the data is in the following format:
...
0
votes
0answers
20 views
R: obtaining marginal effects from survreg model [migrated]
Could someone quickly explain how to obtain marginal effects from a weibull duration model of the form:
...
1
vote
0answers
36 views
projecting future survival rate
I'm working on a customer retention project that predicts the probability a customer is still subscribing to our services at time T. Unfortunately, we only have the most recent two years of customer ...
9
votes
2answers
685 views
What distribution does my data follow?
Let us say that I have 1000 components and I have been collecting data on how many times these log a failure and each time they logged a failure, I am also keeping track of how long it took my team to ...
0
votes
1answer
28 views
Burns survival dataset - meaning of midpoint of set interval
I'm using the well-known USC Burns Survival dataset to explore logistic regression in R.
The independent variable is burn area, and the outcome is binary survival (yes/no).
In the documentation, ...
0
votes
0answers
62 views
extended cox model with continuous time dependent covariate - how to structure data?
I need to run an extended cox model with a time-varying covariate in R: let’s call it the number of doses (X). I am interested in the hazard ratio associated with each level of X, ie. how an ...
0
votes
0answers
17 views
Are there alternative estimators for median of survival time in R?
Apparently there is no consensus upon how to estimate it (see here ). I want to report other estimators as well; are these other estimators implemented anywhere among R packages?
0
votes
1answer
35 views
The coefficient of one variable in Cox regression becames negtive when doing multiple variable regression
I am doing Cox proportional regression. I first did Cox regression with only one variable var; its coefficient 0.8752721 was about what I expected and is easy to ...
2
votes
2answers
122 views
Discrete-Time Event History (Survival) Model in R
I'm trying to fit a discrete-time model in R, but I'm not sure how to do it.
I've read that you can organize the dependent variable in different rows, one for each time-observation, and the use the ...
0
votes
1answer
117 views
Simulation Analysis of a Cox Survival Model with Change Point.
I wish to simulate survival data for the following probabilistic model which will be analyzed using a Cox model:
An exposure $X$ is modeled as binary having $X \sim_{iid} \mbox{Bernoulli}(p)$ where ...
4
votes
1answer
130 views
Discrete time hazard models (cloglog) in R
The survival package in R appears to focus on continuous time survival models. I am interested in estimating a discrete time ...
0
votes
0answers
56 views
How can I manually calculate Score and Schoenfield residuals for a coxph fit in R?
I am trying to develop a solid understanding of Martingales and various survival residuals calculated using Martingales. To do that, I am attempting to explicitly calculate them for the below dataset ...
0
votes
0answers
113 views
Fitting Weibull regression with ancillary shape parameter in R
I am trying to replicate a Weibull model for political leaders' survival in R. The model uses the Weibull distribution with the hazard rate h(t)=lambda*pt^(p-1).
...
1
vote
0answers
114 views
Is conditional logit a specific form of GLM? And what are its specificities?
Background: For a project, I am fitting a conditional logit model where I have 5 control cases for every realized case. To do that I use the clogit() function in ...
0
votes
0answers
101 views
R: Generating values for Brownian bridge process for EP bands of Survival function
I'm trying to generate equal-precision (EP) bands for a survival function. Am reading Klein & Moeschberger: Survival Analysis and the original paper from which they quote: Nair 1986
I'm stuck on ...
0
votes
0answers
45 views
Proper confidence interval for survival model with groups
In my study I have people with features A, B, and C. There can be many people, $n$, with the same features. We observe the event at time $t$. Example data:
...
1
vote
1answer
81 views
Multiple endpoints in survival analysis of individual careers
I analyze labour market activities. I measure JD: job duration (time between beginning and ending of employment) and PD: ...
0
votes
0answers
36 views
Numerical integration problem
I thought I would write this to Stack Overflow, but LaTeX Math is not working there. I am trying to program the following equation in R:
$\hat{\sigma}^2=1/n\sum_{i=1}^{n}[\int ...
0
votes
0answers
98 views
How to interpret significant effects from a Weibull model when the Weibull assumption is met but the AFT/PH one is _not_
I have some survival data that I want to analyze (using survreg from the R survival package with the Weibull distribution). I ...
2
votes
2answers
167 views
Values for integral of square of standard Brownian process
I am trying to generate values in a table for the following function:
$$
W = \int_0^1 [B(t)]^2 dt
$$
Where $B(t)$ is a standard Brownian motion.
Example: $W_{0.05} = 1.656$, $W_{0.025} = 2.135$.
...
3
votes
1answer
169 views
Comparing means of two simple time series
I'm trying to look for difference in timing (ie. earlier/later) in a variable measured at regular intervals between two groups.
This seems like a simple experimental design, and working in R, I'm ...
8
votes
2answers
286 views
Propensity score weighting in Cox PH analysis and covariate selection
Regarding propensity score weighting (IPTW) when doing Cox proportional hazard modeling of time-to-event survival data:
I have prospective registry data where we're interested in looking at treatment ...
2
votes
1answer
159 views
Best method to validate a multiply imputed Cox model with R?
This question is with regards to using a test data set to validate an imputed Cox model using R. With a non-imputed data set I would use val.surv() from ...
0
votes
0answers
76 views
Interval censored current status data Cox proportional hazards model in R
Given interval censored survival times, how do I perform a current status data (case1 interval censored survival time) Cox PH model in R? I found the R package intocox, but the output is not ...
2
votes
0answers
60 views
Combined variance following multiple imputation with survival model
I have created 5 imputations of a dataset and have fit a survival model to them all in R. I want to combine the estimates of the coefficients and the standard errors of the coefficients. To do this I ...
0
votes
0answers
25 views
How to change the data structure from “group” to “individual” form for logrank test in R?
I'm working on mortality test by using fish exposing some chemicals. At the end got the data like this (a~g represent group, number represent no. of dead fish, each group n=40):
...
7
votes
1answer
220 views
Using multiple imputation for Cox proportional hazards, then validating with rms package?
I've been researching the mice package, and I haven't yet discovered a way to use the multiple imputations to make a Cox model, then validate that model with the rms package's ...
5
votes
1answer
348 views
EM algorithm R code on Cox PH model with frailty
Let say I have a 'kidney catheter' data set. Data are about the recurrence times to infection, at the point of insertion of the catheter, for kidney patients using portable dialysis equipment. ...
0
votes
0answers
156 views
Interval censored Cox proportional hazards model in R
Given interval censored survival times, how do I perform an interval censored Cox PH model in R? An rseek search turns up the package ...
1
vote
0answers
157 views
How to generate predicted survivor curves from frailty models (using R coxph)?
I want to compute predicted survivor function for a Cox proportional hazards
model with frailty terms [using survival package]. It appears that when
frailty terms are in the model, the predicted ...
2
votes
1answer
188 views
Calculating the Log Hazard Ratio with SE in R
In R, is there a predefined function that will give me the log hazard ratio and its standard error for a black male (as shown in the example below) given the output of coxph regression?
...
1
vote
1answer
99 views
Creating formula object for coxph()
I am trying to create the formula object for coxph() manually, as I want to reproduce it in RSRuby. Note that the response variable needs to be a ...
3
votes
2answers
187 views
Looking for ways to compare between coxph models
I'm running Cox proportional hazards regression in R, and would like to test the option of categorizing one of my continuous variables to factor (I'm aware of the loss of data issue, just checking).
...
3
votes
1answer
193 views
Post-hoc analysis for Logrank test
I need to perform survival analysis for 4 different groups in a study. When I use the Logrank test, the null hypothesis is rejected.
My question is, how can I tell now exactly which pair of groups ...
5
votes
1answer
339 views
R packages (or SAS code) to produce two simultaneous Kaplan-Meier curves?
There's a way to do survival analysis of two (or more I suppose) mutually exclusive competing risks as a mixture of two different survival curves. Something like what you see in A.C. Ghani et al. ...
0
votes
0answers
47 views
R CCH CI Univariable Analysis
Using the survival package in R I am trying to calculate 95% confidence interval (CI) of the proportional hazards model coefficient. Normally this is pretty simple to do with the survival package.
...
3
votes
1answer
149 views
Survival analysis for nested, censored and dependent data
I have to analyse the effects of different treatments on the survival of individuals for 1 week.
But:
the data are 'grouped': individuals were grouped by 10, and the survival probability is ...
2
votes
0answers
116 views
Which probabilites are to be supplied to rcorr.cens and improveProb in package Hmisc?
Both functions are great for comparing, for example, survival models. The first especially for computing Harrell's C-index, the second for NRI and IDI.
However, it looks like ...
5
votes
2answers
1k views
What is the conventional definition of recurrence-free survival?
Hello to all the biostatisticians and epidemiologists out there,
I have looked up and down for a standard definition of recurrence-free survival, and the issue I'm having is determining if the ...
6
votes
1answer
143 views
How important is using the exact method for ties in a Cox model, and how long should this take?
I'm analyzing the results of some simulation work using a Cox proportional hazard model, and I have what I perceive are a great many ties in the data, representing when a particular individual in the ...
1
vote
0answers
57 views
Creating censored DV for survival analysis (in long form)
I am working on a project that requires me to use survival analysis. Specifically, I need to use discrete-unit survival analysis (so Cox regression or other methods that assume my DV is continuous ...
3
votes
0answers
248 views
5
votes
1answer
429 views
What is the “$R^2$” value given in the summary of a coxph model in R
What is the $R^2$ value given in the summary of a coxph model in R?
For example,
Rsquare= 0.186 (max possible= 0.991 )
I foolishly included it a manuscript as ...
4
votes
2answers
240 views
Plotting interval censored follow-up time as a line chart
I'm working on a survival analysis project where it would be useful to visualize everyone's followup time and event times. The data is made up of an ID, which of two possible events they had (A or B), ...
1
vote
1answer
272 views
How to run survival analysis on big dataset?
I am recently involved in a project that needs to analyze the survival time of objects. Therefore, I plan to use the rms package to build a Cox model. The problem is, since the dataset I have is so ...
2
votes
1answer
961 views
Difference between survdiff log-rank and coxph log-rank
I'm using the survival package in R to analyze clinical data. I am analyzing two different groups of patients, when I calculate survdiff in order to compare the curves, I got p= 0.135, but when I ...

