The term Cox regression model (omitting proportional hazards) is sometimes used to describe the extension of the Cox model to include time-dependent factors. However, this usage is potentially ambiguous since the Cox proportional hazards model can itself be described as a regression model.
Questions tagged [cox-regression]
476 questions
0
votes
1 answer
the constant of the Cox model
I have computed a prognostic model using the Cox model (coxph function in R). I provide the standardised regression coefficients in my paper.
However, a reviewer ask me to give the constant of the Cox model.
Is it the same than the baseline…

Joeloutre
- 3
- 3
0
votes
0 answers
Age as a time scale in survival analysis
In survival analysis, you measure the time from some startpoint and right censor your data. The code thus usually looks like this:
fit <- coxph(Surv(time, status) ~ outcome + x1 + x2, data=db)
However, in epidemiological analysis, the startpoint…

Dan Chaltiel
- 7,811
- 5
- 47
- 92
0
votes
1 answer
CoxPHFitter: The input must have at least 3 entries
I am trying to run lifelines' CoxPHFitter (python3) and i get this value error:
The input must have at least 3 entries!
i've read the function it connects to at stats but im not sure how to imply the error to the data i have so i could run it…

Asael Bar Ilan
- 81
- 1
- 9
0
votes
2 answers
coxph in R, beta affected by value of factor?
I'm running a coxph right now. My setup: I have a reference (no treatment), and then three different treatments (A, B, and C). I also have the interactions of A, B, and C, (e.g. samples treated with both treatment A and B, or A and C, etc...). I…

Crawdaunt
- 89
- 1
- 12
0
votes
0 answers
Fine & Gray regression error
fg1<- crr(fu, exitus1, gfr, tdm, failcode=1, cencode=0)
summary(fg1)
I obtain this error and I don't understand why and how to fix it:
Error in tf(uft) : argument "tf" is missing, with no default
Here are my data:
> str(fu)
num [1:87] 15 27…

ArTu
- 431
- 4
- 20
0
votes
0 answers
Survival analysis with time varying covariates using coxph in R
This is a snapshot of the R data frame df1 that I have.
NEW_UPC IRI_KEY WEEK UNITS DOLLARS F D PR
11820005991 1073521 1230 1 14.29 NONE 0 0
11820005991 1073521 1232 1 …

Rnovice
- 333
- 1
- 5
- 18
0
votes
1 answer
Cox regression : Are we supposed to keep the status column for test?
From the examples that I have seen for cox-regression:
http://www.sthda.com/english/wiki/cox-proportional-hazards-model ,
the data includes the status or event column as well.
But if I wish to train the cox model on train data, and then use the…

rj dj
- 260
- 1
- 5
- 22
0
votes
0 answers
What is the "linear.predictors" in the result of cox?
I analyzed cox proportional hazard regression with example data.
My R code is below.
install.packages("randomForestSRC")
install.packages("survival")
library(randomForestSRC)
library(survival)
data(pbc, package="randomForestSRC")
pbc.na <-…

SJUNLEE
- 167
- 2
- 14
0
votes
1 answer
Plot a quadratic relation for a predictor of a cox regression with R
I need to plot the relative risk for a quadratic effect in a cox regression. My model looks like this:
cox_mod <- coxph(Surv(time, status) ~
ph.karno + pat.karno + meal.cal + meal.cal_q,
data = lung)
Where meal.cal_q is…
user9413061
0
votes
1 answer
Extimate prediction accuracy of cox ph
i would like to develop a cox proportional hazard model with r, use it to predict input and evaluate the accuracy of the model. For the evaluation I would like to use the Brior score.
# import various packages, needed at some point of the…

User12547645
- 6,955
- 3
- 38
- 69
0
votes
0 answers
Formatting data for survival analysis - time variable in long form data
I'm new to survival analysis, and am unsure if I'm formatting my data correctly.
Using this dummy data:
id <- c(rep("1", 10), rep("2", 10), rep("3", 10), rep("4", 10), rep("5", 10))
age <- c((15:24), (35:44), (45:54), (55:64), (40:49))
event <-…

T.P.
- 87
- 1
- 6
0
votes
1 answer
adjust axis and colours figure simPH package R
I'm using the simPH package to plot hazard ratio's. As my variable is time, I would rather change the ticks and intervals at the x-axis to 0,30,60,90 etc instead of 0,50,100,150 which is currently plotted based on my data (x ranges from 0 to 180).…

LHey
- 31
- 1
- 3
0
votes
1 answer
effect modification from coxph in R
I am investigating effect modification in the context of a time-varying cox model in R. My model is as follows:
fit1.1<- with (data, coxph(Surv(startdays, enddays, event) ~ age*strata(Region) + BMI.time.var + cluster(id), ties="breslow"))
I get the…

Trenton Honda
- 13
- 3
0
votes
1 answer
How do I extract an individual graph from ggcoxdiagnostics dfBeta output in R?
Running ggcoxdiagnostics to produce dfBeta plots for a multivariate coxph regression model.
require(survival)
require(survminer)
# Dummy data
set.seed(100)
permth_int <- seq(10)
mortstat <- c(rep(1,9),0)
age <- runif(10,50,70)
sex …

Duncan McGregor
- 3
- 2
0
votes
1 answer
IDI.INF function to compare the performance of two Cox regression models
I would like to use the IDI.INF function from the survIDINRI package to the performance of two Cox regression models.
For this purpose, I have used the following script:
> D=subset(Dataset, select=c("time","status","Var1","Var2","Var3", "Var4",…

Triade
- 11
- 1