Questions tagged [cox]

67 questions
0
votes
0 answers

R - Different length in variable and residuals from the model

I'm trying to find the the best variable transformation that yields linearity in log hazard or log cumulative hazard of a Cox proportional Hazard model. As those ar research data, I cannot publish them here. For this I'm trying to plot the variable…
ecjb
  • 5,169
  • 12
  • 43
  • 79
0
votes
0 answers

R- Likelihood function for Cox model with frailty

I am trying to write an R code for the likelihood function for a cox model with gamma frailty. I know there are packages in R which would do that easily. But I want to write a customized likelihood function for cox model with gamma frailty for my…
0
votes
0 answers

Survival analysis for various timepoints

I am running survival analysis on a very large data set and attempting to examine the impact of a particular variable on survival at various time points (30 days, 90 days, 180 days, 365 days). I want to run a univariate Cox regression and I am not…
Sam
  • 11
0
votes
1 answer

Lifelines boolean index in Python did not match indexed array along dimension 0; dimension is 88 but corresponding boolean dimension is 76

This very simple piece of code, # imports... from lifelines import CoxPHFitter import pandas as pd src_file = "Pred.csv" df = pd.read_csv(src_file, header=0, delimiter=',') df = df.drop(columns=['score']) cph = CoxPHFitter() cph.fit(df,…
slesher
  • 109
  • 2
  • 13
0
votes
1 answer

Cox Hazard in function R

I have problem with reference to the variable in R. Look for my easy function: CoxStep <- function(dataset,a,b){ m1 = coxph(Surv(b,a)~.-dataset[,b]-dataset[,a] ,data=dataset) summary(m1) } I call the function as follow: CoxStep(data,…
0
votes
0 answers

Cox Proportional hazard model - Comparing coefficients from sub datasets

I am doing a study of credit risk in europe for the period of 2006 - 2016 by using the Cox Proportional Hazard Model (time costant edition) in R (coxph). I have succesfully implemented the model for the whole period with 8 independent variables. Now…
0
votes
1 answer

extract log rank (score) test result wiht p-value for Coxph Model

I have 100 replicates of coxph model fitted in loop. I am trying to extract out log-rank score test result with p-values for each replicate in a data frame or list. I am using the following. But, it gives me only log rank score, not p-value. Any…
Krina M
  • 135
  • 2
  • 13
1 2 3 4
5