Skip to main content
Filter by
Sorted by
Tagged with
Advice
0 votes
1 replies
30 views

I am running a mixed effects cox model using coxme in R, and I cannot find any information on how to check model assumptions for this type of model. I have seen the older chats, which have recommended ...
Lene's user avatar
  • 33
0 votes
0 answers
44 views

I am fitting a Cox proportional hazards model in Stata and checking the proportional hazards (PH) assumption using estat phtest. Here is how I set up my survival data: stset time, failure(event) ...
Sourav Roy's user avatar
0 votes
0 answers
99 views

I am trying to create a restricted cubic splines plot with the R RMS package and imputed data from the R MICE package. I could not find information on how to combine the different imputations from ...
Fabian Weiss's user avatar
4 votes
1 answer
95 views

I am trying to understand how the predict function works for conditional logit. I tried to calculate it manually but it does not work. Any help would be greatly appreciated. library(survival) set....
Pam G's user avatar
  • 57
0 votes
0 answers
50 views

I'm running a Cox PH Model to examine survival times among a population, and my model outputs fine, except I want to change the categories its using as the reference/baseline (i.e. right now it's ...
floogoo's user avatar
0 votes
1 answer
138 views

I am trying to train a time-independent Cox model on a dataset of ~750,000 rows, as well as a time-dependent one on several million rows. I have 19 variables, some of which are binary and some ...
MKJ's user avatar
  • 338
2 votes
1 answer
66 views

I am plotting a nonlinear generalized additive model (gam) using R's mgcv package: library(mgcv) V <- rep(1, nrow(dt) fit <- gam(cbind(V, group_number) ~ s(time_elapsed, exposure_group, bs='fs'...
Stefan Verweij's user avatar
0 votes
0 answers
16 views

In a model we are developping for a project, we use a Cox Proportional Hazard model. We compared the table from the summary and the tab_model() of the model. What we have observed is the ...
Buczinski's user avatar
4 votes
2 answers
122 views

I am interested in plotting the HR from a coxph() model for a categorical-continuous interaction. Basically estimating the binary HR at multiple values of the continuous predictor and then plotting ...
LucaS's user avatar
  • 1,335
0 votes
0 answers
24 views

Disclaimer: I am new to R and survival analyses so apologies if I don't use the right terms or coding etiquette-figuring it out. In the carcass package, I've used function persistence.prob to develop ...
stalegeck's user avatar
0 votes
0 answers
87 views

I'm trying to do a stepwise Cox regression imputing missing values. As a first step I tried a simple stepwise procedure using the StepReg package but I ran into the following issue: set.seed(123) ...
devster's user avatar
  • 159
0 votes
1 answer
63 views

I made up some dummy data that has a very similar structure as our internal data I cannot share. I would like to know how to prepare it for the Cox Regression. Could you help me to pre-process the ...
Lubomir Burian's user avatar
1 vote
0 answers
46 views

Recently, I learnt about DynNom function which allows one to generate a dynamic nomogram. When I attempted to generate a dynamic nomogram from a Cox model allowing for time varying coefficient after ...
Richard's user avatar
  • 11
1 vote
1 answer
280 views

This question is related to another that I posted here: How to visually assess tt() suitability in coxph? If we have a time-varying HR that arises from a time-dependent coefficient because we have ...
LucaS's user avatar
  • 1,335
0 votes
1 answer
377 views

My first question here. I would like to add a number at risk table to the survival curves from multivariate Cox proportional hazards models that use clustering. ggadjustedcurves will produce the ...
Chris987tape's user avatar
1 vote
1 answer
118 views

If I run the following Python code it works well: target = 'churn' tranOH = ColumnTransformer([ ('one', OneHotEncoder(drop='first', dtype='int'), make_column_selector(dtype_include='category', ...
skan's user avatar
  • 7,790
0 votes
0 answers
75 views

I am running a joint modeling of a linear mixed model and a Cox model as below. rbcLME <- lme(log(RBC.counts+1)~time+time:DAC, random = ~1|ID, data=no.missing.rbc) rbcSURV <- coxph(...
user3561144's user avatar
1 vote
0 answers
74 views

I am applying strata on the Rossi dataset using CoxTimeVaryingFitter and when I call ctv.baseline_survival_ I am getting a dataframe with only one column, but expected two columns - one for each ...
Justin Lallemand's user avatar
1 vote
1 answer
1k views

I am building a Cox PH model using the survival package in R and would like to include a time-dependent coefficient for my categorical variable. Reproducible data set up: library(survival) # Data ...
Reid's user avatar
  • 37
1 vote
0 answers
272 views

I am running cox PH survival analyses for diabetes as an outcome, with <10 variables and no interaction terms. The c stats are all consistent with the literature sitting at around 0.75-0.80, as ...
Isobel Howard's user avatar
1 vote
0 answers
48 views

I used the following code: library(survival) library(gtsummary) library(dplyr) df <- data.frame( time = sample(1:10, 20, replace = TRUE), status = sample(0:1, 20, replace = TRUE), age = ...
B_slash_'s user avatar
  • 412
0 votes
1 answer
140 views

I am trying to calculate the hazard rate of two treatments, which have more risk early in time compared to later. I've provided an example dataset and analysis below to highlight my situation. I've ...
ctlamb's user avatar
  • 133
0 votes
0 answers
90 views

I have a question where I am trying to build a proportional hazard model with a time-varying constant. Effectively the question is the occurance of an illness following a traumatic event. The ...
DW1310's user avatar
  • 333
0 votes
1 answer
131 views

I have tried to visualise the proportional hazard (ph) assumption for my cox-ph model by plotting the smooth scaled schoenfeld residual plot. I'm working in R. The residual plot is computed in R like ...
Devi Sita's user avatar
  • 223
0 votes
0 answers
137 views

I'm currently working on survival functions and especially on forest plots. I would like to plot the different levels of confidence intervals on the same line, with different colors or shades. To do ...
Jpaete's user avatar
  • 59
1 vote
1 answer
82 views

Do you know how to plot a case-cohort study where we perform a Cox regression to estimate HR of different covariates, in which I am specially interested in potential molecular biomarkers and its ...
Javier Hernando's user avatar
0 votes
1 answer
347 views

I got a problem with the results of my cox model in R. Anytime I put in multiple predictors, the last one (alphabetically) turns out with NA's and I don't know how to fix it. I tried with various ...
Sarah Kallmeyer's user avatar
1 vote
0 answers
95 views

xy = Score(list(cox_ph), formula=Surv(time,status)~1,data=cox.train, metrics=c("brier","auc"), null.model=FALSE,times=time.int,debug = TRUE) Extracted test set and prepared output ...
user23902942's user avatar
0 votes
1 answer
297 views

I am little bit crazy trying to run a penalized cox ph regression model with functions of rms package. I’ve done it with glmnet package but I would like to analize the outputs with rms and Hmisc ...
sinectica's user avatar
1 vote
1 answer
198 views

I'm trying to develop estimated survival curves from my Cox PH Model in R. Since it is a multi-state model I have added a new data argument where I've kept covariates constant except for the 1 for ...
Kevin Clifford's user avatar
1 vote
1 answer
222 views

I am calculating a cox model with two predictor variables (var1 and var2). var1 is a numeric variable and enters the cox regression without any modification. var2 on the other hand enters the cox ...
user18632888's user avatar
1 vote
1 answer
208 views

So I'm working with a dataset of Stroke cases from an hospital, and I would like to use Cox regression to make a survival analysis using time of arrival in the hospital, time of leave and survival or ...
Lucy Janssens's user avatar
0 votes
0 answers
17 views

A very broad question I had asked but my set up like this. So I took a data that was published in 2013-14 when nejm paper for AML came out, so the criteria i took is FAB classification then , ...
kcm's user avatar
  • 200
0 votes
0 answers
52 views

library(survival) set.seed(1) STARTAGE = sample(20:60, 100, T) ENDAGE = sample(5:20, 100, T) STATUS = sample(0:1, 100, T) X1 = sample(1:3, 100, T) X2 = sample(1:10, 100, T) MODEL1 = survfit(Surv(...
bvowe's user avatar
  • 3,394
2 votes
0 answers
297 views

I have data I would like to analyze using a Cox proportional hazards model. The dataset contains an outcome variable (e.g. alive/dead), a follow-up time variable, quantitative and qualitative ...
Eurytos's user avatar
  • 21
2 votes
1 answer
471 views

I fitted a mixed effects cox model using the package coxme. The model includes a two-level variable as fixed effect and a random intercept. I want to predict survival probability and 95% confidence ...
frederic.ddb's user avatar
0 votes
1 answer
1k views

I have a Cox regression model as follows: library(dplyr) library(survival) library(eha) df <- data.frame(id = c("a", "a", "a", "b", "b", "c&...
Cloft X's user avatar
  • 458
3 votes
1 answer
2k views

I have created a mixed effects cox regression using coxme. Q1) I would like to plot the coefficients of the fixed effects in an adjusted survival curve. However, it seems this functionality in ...
Luke Jenner's user avatar
0 votes
0 answers
151 views

I want to do a survival analysis and cox regression for metastasis data to see if there are any significant genes associated with early metastasis. The data set has gene names as columns, time at ...
Cadmus's user avatar
  • 1
0 votes
1 answer
1k views

hoping the hive can help me understand this. I want to study the effect of a continuous variable (x1) on survival, accounting for interaction between x1 and another continuous variable (x2). My full ...
S Zhou's user avatar
  • 1
0 votes
0 answers
146 views

I'm currently utilizing the shap library to interpret a hybrid model that combines a Cox proportional hazards model with a Multi-Layer Perceptron (MLP) using the pycox library. Interestingly, the ...
Gavin Xu's user avatar
0 votes
1 answer
153 views

I need to extract into a new column the number of observations per level from a Cox regression object. If I run: res <- coxph(Surv(age, status) ~ score, data = df) res %>% tbl_regression(exp = T)...
karamba's user avatar
0 votes
1 answer
235 views

I am currently working on obtaining survival probabilities from Cox proportional hazard models. Initially, I utilized the coxph function, but for large data, it proved to be slow when predicting at ...
Linda A's user avatar
  • 33
0 votes
0 answers
122 views

I have a pretty standard survival analysis set-up with right-censoring, and tracking users at regular time intervals measured from a relative t=0 time. I have two static covariates X1 and X2, but one ...
George's user avatar
  • 1
0 votes
1 answer
291 views

I have written below code to run cox regression and output them to a table. I want to run univariate on many variables. Can you help me to use a loop to make it faster. variables are Grade, DCIS, LVE, ...
nicholaspooran's user avatar
1 vote
1 answer
408 views

I ran univariate cox regression model using following code. res <- coxph(Surv(DFS, DFS.Event) ~ Grade, data = Grade) summary(res) It output as follows: Call: coxph(formula = Surv(DFS, DFS.Event) ~ ...
nicholaspooran's user avatar
0 votes
1 answer
41 views

I would like to run a loop for Cox models that adjust for different subsets of covariates. The desired output should include number of events, person-years, hazards ratios, and 95%CI. If I call coxph ...
trinhtran's user avatar
0 votes
1 answer
256 views

I want to extract observed and predicted estimates from time to event riskRegression::FGR() competing risk model object. Below is some simulated data: library(simstudy) library(data.table) library(...
Mahim 's user avatar
  • 13
0 votes
0 answers
88 views

I tried to fit survival model with 4 variables violating proportional hazard assumption. I read following vignette (https://cran.r-project.org/web/packages/survival/vignettes/timedep.pdf) and seared ...
JY J's user avatar
  • 21
0 votes
0 answers
241 views

I tried to fit survival model with several variables violating proportional hazard assumption. I read following vignette thoroughly, but cannot get satisfactory answers for my case. (https://cran.r-...
JY J's user avatar
  • 21

1
2 3 4 5
10