search for: coxph

Displaying 20 results from an estimated 776 matches for "coxph".

2012 Jul 06
1
How to compute hazard function using coxph.object
My question is, how to compute hazard function(H(t)) after building the coxph model. I even aware of the terminology that differs from hazard function(H(t)) and the hazard rate(h(t)). Here onward I wish to calculate both. Here what I have done in two different methods; ########################################################################################## ############...
2011 Sep 12
1
coxreg vs coxph: time-dependent treatment
Dear List, After including cluster() option the coxreg (from eha package) produces results slightly different than that of coxph (from survival) in the following time-dependent treatment effect calculation (example is used just to make the point). Will appreciate any explaination / comment. cheers, Ehsan ############################ require(survival) require(eha) data(heart) # create weights follow <- heart$stop - he...
2004 Oct 26
2
vcov method for 'coxph' objects
Dear all, The help file for the generic function vcov states "Classes with methods for this function include: 'lm', 'glm', 'nls', 'lme', 'gls', 'coxph' and 'survreg' (the last two in package 'survival')." Since, I am not able to use vcov.coxph(), I am wondering whether I am missing something (as I suspect..) regards, vito library(survival) > o<- coxph( Surv(time, status) ~ x + strata(sex), test1) #example from ?...
2006 Dec 29
2
Survfit with a coxph object
I am fitting a coxph model on a large dataset (approx 100,000 patients), and then trying to estimate the survival curves for several new patients based on the coxph object using survfit. When I run coxph I get the coxph object back fairly quickly however when I try to run survfit it does not come back. I am wonderin...
2007 Nov 08
2
mapply, coxph, and model formula
Hello - I am wanting to create some Cox PH models with coxph (in package survival) using different datasets. The code below illustrates my current approach and problem with completing this. ### BEGIN R SAMPLE CODE ############################## library(survival) #Define a function to make test data makeTestDF <- function(n) { times <- sample(1...
2007 Dec 17
2
Capture warning messages from coxph()
Hi, I want to fit multiple cox models using the coxph() function. To do this, I use a for-loop and save the relevant results in a separate matrix. In the example below, only two models are fitted (my actual matrix has many more columns), one gives a warning message, while the other does not. Right now, I see all the warning message(s) after the for-lo...
2011 Mar 01
1
glht() used with coxph()
Hi, I am experimenting with using glht() from multcomp package together with coxph(), and glad to find that glht() can work on coph object, for example: > (fit<-coxph(Surv(stop, status>0)~treatment,bladder1)) coxph(formula = Surv(stop, status > 0) ~ treatment, data = bladder1) coef exp(coef) se(coef) z p treatmentpyridoxine -0.063...
2006 Jan 17
2
help with parsing multiple coxph() results
Dear All: I have a question on using coxph for multiple genes: I have written code to loop through all 22283 genes in the Hgu-133A and apply coxph on survival data. However, I don't know how to work with the result for each gene: survtest<-coxph(Surv(pcc.primary.stg.3.cox[,'fup_interval'],pcc.primary.stg. 3.cox[,'en...
2004 Oct 06
4
R2.0.0 bug in function vcov in library survival (PR#7266)
Full_Name: Sven Sandin Version: 2.0.0 OS: SuSE Linux 9.0 Submission from: (NULL) (81.227.17.135) Have just compiled and installed R-2.0.0.tar.gz running SuSE9.0. The function vcov do not accept "coxph" object as input any longer. The same R-program running R1.9.1 do work. R-program attached below. Exporting the coxph object from R2.0.0 to R1.9.1 I get vcov ouput in R1.9.1. Exporting the coxph object from R1.9.1 to R2.0.0 I get errors in R2.0.0 =========== Copy of the R-program ==========...
2008 Apr 18
1
Overall p-value from a factor in a coxph fit
Hi all. If I run the simple regression when x is a categorical variable ( x <- factor(x) ): > MyFit <-coxph( Surv(start, stop, event) ~ x ) How can I get the overall p-value on x other than for each dummy variable? > anova(MyFit) does NOT provide that information as previously suggested on the list. All the best, Kare [[alternative HTML version deleted]]
2007 Nov 09
2
wrapper for coxph with a subset argument
Dear R-help - Thanks to those who replied yesterday (Christos H. and Thomas L.) regarding my question on coxph and model formula, the answers worked perfectly. My new question involves the following. I want to run several coxph models (package survival) with the same dataset, but different subsets of that dataset. I have found a way to do this, described below in functions subwrap1 and subwrap2. Thes...
2007 Apr 17
3
Extracting approximate Wald test (Chisq) from coxph(..frailty)
Dear List, How do I extract the approximate Wald test for the frailty (in the following example 17.89 value)? What about the P-values, other Chisq, DF, se(coef) and se2? How can they be extracted? ######################################################> kfitm1 Call: coxph(formula = Surv(time, status) ~ age + sex + disease + frailty(id, dist = "gauss"), data = kidney) coef se(coef) age 0.00489 0.0150 sex -1.69703 0.4609 diseaseGN 0.17980 0.5447 diseaseAN...
2010 Jul 30
1
COXPH: how to get the score test and likelihood ratio test for a specific variable in a multivariate Coxph ?
Hello, I would like to get the likelihood ratio and score tests for specific variables in a multivariate coxph model. The default is Wald, so the tests for each separate variable is based on Wald's test. I have the other tests for the full model but I don't know how to get them for each variable. Any idea? David Biau. [[alternative HTML version deleted]]
2011 Mar 13
1
using pre-calculated coefficients and LP in coxph()?
I need to force a coxph() function in R to use a pre-calculated set of beta coefficients of a gene signature consisting of xx genes and the gene expression is also provided of those xx genes. If I try to use "coxph()" function in R using just the gene expression data alone, the beta coefficients and coxph$linea...
2011 Jul 10
1
Package "survival" --- Difference of coxph strata with subset?
[code]>require("survival") > coxph(Surv(futime,fustat)~age + strata(rx),ovarian) Call: coxph(formula = Surv(futime, fustat) ~ age + strata(rx), data = ovarian) coef exp(coef) se(coef) z p age 0.137 1.15 0.0474 2.9 0.0038 Likelihood ratio test=12.7 on 1 df, p=0.000368 n= 26, number of events= 12 > coxph(Su...
2004 Mar 05
1
Application of step to coxph using method="exact" (PR#6646)
Full_Name: John E. Kolassa Version: Version 1.8.1 OS: Solaris Submission from: (NULL) (128.6.76.36) Stepwise model selection for coxph appears to fail with method="exact". The code step(coxph(Surv(1:100,rep(1,100))~factor(rep(1:4,25)),method="exact")) produces the error message Start: AIC= 733.07 Surv(1:100, rep(1, 100)) ~ factor(rep(1:4, 25)) Error in "[<-"(`*tmp*`, i + 1, , value = extra...
2004 May 16
2
Error in using coxph()
...ge in: fitter(X, Y, strats, offset, init, control, weights = weights,..." Details : --------- E is a vector of survival times (or censored times), 1-F is a vector of '0's, and cov is a matrix of 1 column. There are altogether 75 observations. Tried : ------ P <- try(surv.cox <- coxph(Surv(E, 1-F) ~ cov, coxph.control(iter.max=1e10, eps = 1e-03))) Output (from above command) : ----------------------------- Call: coxph(formula = Surv(E, F) ~ cov, data = coxph.control(iter.max = 1e+10, eps = 0.001)) coef exp(coef) se(coef) z p cov -0.233 0.793 0.11 -2...
2008 Jun 16
1
回复: cch() and coxph() for case-cohort
I tried to compare if cch() and coxph() can generate same result for same case cohort data Use the standard data in cch(): nwtco Since in cch contains the cohort size=4028, while ccoh.data size =1154 after selection, but coxph does not contain info of cohort size=4028. The rough estimate between coxph() and cch() is same, but the lo...
2009 Jun 15
2
coxph and robust variance estimation
Hello, I would like to compare two different models in the framework of Cox proportional hazards regression models. On Rsitesearch and google I don't find a clear answer to my question. My R-Code (R version 2.9.0) coxph.fit0 <- coxph(y ~ z2_ + cluster(as.factor(keys))+ strata(stratvar_), method="breslow" ,robust=T ) coxph.fit1 <- coxph(y ~ z_ + cluster(as.factor(keys))+ strata(stratvar_), method="breslow" ,robust=T ) # marker and covariates # Analysis of Devaince table coxp...
2012 Jan 25
4
formula error inside function
...0-Wb) C <- runif(n,0,1) time <- ifelse(T<C,T,C) event <- ifelse(T<=C,1,0) mean(event) phmmd <- data.frame(Z) phmmd$cluster <- clusters phmmd$time <- time phmmd$event <- event fmla <- as.formula("Surv(time, event) ~ Z1 + Z2") BaseFun <- function(x){ start.coxph <- coxph(x, phmmd) print(start.coxph) betahat <- start.coxph$coefficient print(betahat) print(333) print(survfit(start.coxph))...