search for: cox2

Displaying 5 results from an estimated 5 matches for "cox2".

Did you mean: col2
2018 Jan 27
3
error en función ggadjustedcurves, paquete survminer
Tengo un modelo de regresión de Cox y quiero obtener el plot ajustado por una covariable (sexo) con la función ?ggadjustedcurves?, pero me da el siguiente error: > cox2 <- coxph(os ~ imc_25 + sexo.1, data = datos) > cox2 Call: coxph(formula = os ~ imc_25 + sexo.1, data = datos) coef exp(coef) se(coef) z p imc_25 -0.621 0.537 0.299 -2.08 0.038 sexo.1M 0.714 2.042 0.387 1.84 0.065 Likelihood ratio test=6.23 on 2 df, p=0.04...
2007 Mar 06
2
Estimating parameters of 2 phase Coxian using optim
Hi, My name is Laura. I'm a PhD student at Queen's University Belfast and have just started learning R. I was wondering if somebody could help me to see where I am going wrong in my code for estimating the parameters [mu1, mu2, lambda1] of a 2-phase Coxian Distribution. cox2.lik<-function(theta, y){ mu1<-theta[1] mu2<-theta[2] lambda1<-theta[3] p<-Matrix(c(1, 0), nrow=1, ncol=2) Q<-Matrix(c(-(lambda1 + mu1), 0, lambda1, -mu2), nrow=2, ncol=2) q<-Matrix(c(mu1, mu2), nrow=2, ncol=1) for (i in...
2018 Mar 28
0
coxme in R underestimates variance of random effect, when random effect is on observation level
...3, x4 = x4) } set.seed(101) ### Individual random effects (frailty). sd.2<-rep(0,50) for (i in 1:50){ data2<-simulWeib(25000,lambda=0.0001,rho=2,beta1=0.33,beta2=5,beta3=0.25,beta4=0,rateC=0.0000000001, sigma = 0.25) data2$id<-as.factor(data2$id) fit.cox2<-coxme(Surv(time,status) ~ x1 + x2 + x3 + (1 | id), data=data2) sd.2[i]<-sqrt(as.numeric(fit.cox2$vcoef)) print(i) } print("model 2 done") ### Same as previous example, but patients are grouped sd.10<-rep(0,50) for (i in 1:50){ data10<-simulWeib.group...
2004 May 10
1
Explaining Survival difference between Stata and R
...spits out numbers just fine. I wonder if I should specify initial values for coxph? I got a dataset from a student who uses Stata and try to replicate in R. I will share data to you in case you want to see for yourself. Let me know if you want text or Stata data file. In R, I try this: > cox2 <- coxph(Surv(yrs2,ratify)~ accession+ haz.wst+ haz.in +haz.out+ wefgov+ rle+ rqe + pol.free +tai.2001 + ny.gdp.pcap.pp.cd + eio, data=dat3, control=coxph.control(iter.max=1000),singular.ok=T) Warning message: Ran out of iterations and did not converge in: fitter(X, Y, strats, offset, init, c...
2007 Mar 13
0
multiplying matrix by vector of times
...ng R. I was wondering if somebody could help me >>>>> to see >>>>> where I am going wrong in my code for estimating the parameters >>>>> [mu1, mu2, >>>>> lambda1] of a 2-phase Coxian Distribution. >>>>> >>>>> cox2.lik<-function(theta, y){ >>>>> mu1<-theta[1] >>>>> >>>>> mu2<-theta[2] >>>>> >>>>> lambda1<-theta[3] >>>>> >>>>> p<-Matrix(c(1, 0), nrow=1, ncol=2) >>>...