search for: cph

Displaying 20 results from an estimated 4310 matches for "cph".

Did you mean: ch
2007 Feb 15
1
bootcov and cph error
Hi all, I am trying to get bootstrap resampled estimates of covariates in a Cox model using cph (Design library). Using the following I get the error: > ddist2.abr <- datadist(data2.abr) > options(datadist='ddist2.abr') > cph1.abr <- cph(Surv(strt3.abr,loc3.abr)~cov.a.abr+cov.b.abr, data=data2.abr, x=T, y=T) > boot.cph1 <- bootcov(cph1.abr, B=100, coef.reps=TR...
2010 Aug 05
3
How to extract se(coef) from cph?
Hello, I am modeling some survival data wih cph (Design). I have modeled a predictor which showed non linear effect with restricted cubic splines. I would like to retrieve the se(coef) for other, linear, predictors. This is just to make nice LateX tables automatically. I have the coefficients with coef(). How do I do that? Thanks, David B...
2009 Apr 14
1
Function call error in cph/survest (package Design)
Dear UseR, I do not know if this a problem with me, my data or cph/survest in package design. The example below works with a standard data set, but not with my data, but I cannot locate the problem. Note that I am using an older package of survival to avoid a problem with the newly renamed function in survival meeting Design. Dieter # First, check standard exa...
2007 Aug 27
2
validate (package Design): error message "subscript out of bounds"
...3,55,33,36,53,48,25,54,58,60,34, 47,23,34,60,39,34,22,30,41,55,64,48,34,54)) frame.bc # preparing for a simple univariate Cox regression: dd.bc <- datadist(frame.bc[, c('bc1','age')], adjto.cat='first') options(datadist = 'dd.bc') # a univariate Cox regression: cph.bc <- cph(formula = Surv(time1,status1)~bc1, data = frame.bc, x=TRUE, y=TRUE, surv=TRUE) anova(cph.bc) cph.bc summary(cph.bc) # the validate command for the Cox model: val.cph.bc <- validate(cph.bc, B=200, dxy=TRUE , pr=TRUE) ---------------------- Output from the validate command:...
2008 Dec 13
1
simple list question
I'd appreciate some tips, I'm making a simple mistake trying to extract elements from a list of fit objects. The following command works, coef( cph.list[[1]] ) ,.... coef( cph.list[[3]] ) and so forth. These extract regression coefficients from the appropriate list element. When I try to run this inside a for loop, or an lapply (lapply(cph.list,coef)) I get this error message > for (ii in (1:22)){ + cat(ii,fill=T) + print(...
2004 Sep 03
1
Printing output on Plot
Hi, I'm trying to print the p-values from the output of a CPH test onto a Kaplan Meier plot. Can this be done? I only really want the p-values from the CPH test to appear but if this can't be done I am willing to have the entire CPH output. This is what I am currently trying: (it doesn't print the CPH output) plot_KM <- function(field) { l...
2009 May 22
2
System crash when using surv=T in cph
Can someone help me. I am very new to R. I am fitting a Cox model using Frank Harrell's cph as I want to produce a Nomogram. This is what I have done: Srv<- Surv(time,cens) f.cox<- cph(Srv~ v1+v2+v3+v4, x=T, y=T, surv=T) As soon as I press enter, Windows XP crashes. If I remove surv=T, then it works. I have R version 2.9.0. Is there a way of displaying the parameter estimates (ie...
2006 Apr 11
1
cph() in Design package
Hi there, I encountered a weird problem using cph() with Design package: I have 2 datasets, say "dat1" and "dat2", both data frames with 3 columns "time","status" and "scores", all numeric If I run the following: dd<-datadist(dat1) options(datadist='dd') dd time statu...
2011 Nov 30
1
Nomogram with stratified cph in rms package, how to get failure probability
Hello, I am using Dr. Harrell's rms package to make a nomogram. I was able to make a beautiful one. However, I want to change 5-year survival probability to 5-year failure probability. I couldn?t get hazard rate from Hazard(f1) because I used cph for the model. Here is my code: library(rms) f1 <- cph(Surv(retime,dfs) ~ age+her2+t_stage+n_stage+er+grade+cytcyt+Cyt_PCDK2 , data=data11, surv=T, x=T, y=T, time.inc=5) surv<- Survival(f1) haz<- Hazard(f1) Here is the Error in UseMethod("Hazard") : no applicable method fo...
2011 Aug 25
1
survplot() for cph(): Design vs rms
Hi, in Design package, a plot of survival probability vs. a covariate can be generated by survplot() on a cph object using the folliowing code: n <- 1000 set.seed(731) age <- 50 + 12*rnorm(n) label(age) <- "Age" sex <- factor(sample(c('male','female'), n, TRUE)) cens <- 15*runif(n) h <- .02*exp(.04*(age-50)+.8*(sex=='Female')) dt <- -log(runif(n))/h l...
2011 Oct 21
1
cph/nomogram Design/RMS package hazard ratio: interquartile vs per unit
Hello, I am constructing a nomogram using cph and nomogram commands in Dr. Harrell's Design/RMS package. The HR that I obtain for dichotomous and categorical variables are identical to those that I obtain using STATA stcox. However, the inter-quartile HR I obtain for continuous variables is obviously different, since STATA gives me HR for...
2011 Nov 29
2
Nomogram with stratified cph in Design package-- failure probability
Hello, I am using Dr. Harrell's design package to make a nomogram. I was able to make a beautiful one. However, I want to change 5-year survival probability to 5-year failure probability. I couldn?t get hazard rate from Hazard(f1) because I used cph for the model. Here is my code: f1 <- cph(Surv(retime,dfs) ~ age+her2+t_stage+n_stage+er+grade+cytcyt+Cyt_PCDK2 , data=data11, surv=T, x=T, y=T, time.inc=5) surv<- Survival(f1) haz<- Hazard(f1) Here is the Error in UseMethod("Hazard") : no applicable method for 'Haza...
2002 May 17
0
options()$warn==2 and try()
...",survname="fail tm12", censname="failcens") Warning message: Loglik converged before variable 2 ; beta may be infinite. in: fitter(X, Y, strats, offset, init, control, weights = weights, > ## warnings are just warnings when options()$warn=0: > lapply(qq,class) $cph.x1x2 [1] "coxph" $cph.x1x2.int [1] "coxph" > qq <- FitModels(vnames=c("cd3ncd56p","adrpcd8p"),dframe="ALLmth12",survname="failt m12", censname="failcens") Warning message: Loglik converged before variable 1 ; beta may be...
2004 Apr 21
1
difference between coxph and cph
Hi. I am using Windows version of R 1.8.1. Being somewhat new to survival analysis, I am trying to compare cph (Design) with coxph (survival) for use with a survival data set. I was wondering why cph and coxph provide me with different confidence intervals for the hazard ratios for one of the variables. I was wondering if I am doing something wrong? Or if the two functions are calculating hazard ratios and...
2013 Jan 31
1
obtainl survival curves for single strata
...e a model based on Surv(time,response) object, so there is a single row per subject and no start,stop and no switching of strata. The newdata has many subjects and each subject has a strata and the survival based on the subject risk and the subject strata is needed. If I do newpred <- survfit(cph.approve,new=newapp,se=F) I get all strata for every subject. Attempting > newpred <- survfit(cph.approve,new=newapp,id=CertId,se=F) Error in survfit.coxph(cph.approve, new = newapp, id = CertId, se = F) : The individual option is only valid for start-stop data > newpred <- survfi...
2009 Aug 01
1
about the summary(cph.object)
Could someone explain the summary(cph.object)? The example is in the help file of cph. n <- 1000 set.seed(731) age <- 50 + 12*rnorm(n) label(age) <- "Age" sex <- factor(sample(c('Male','Female'), n, rep=TRUE, prob=c(.6, .4))) cens <- 15*runif(n) h <- .02*exp(.04*(age-50)+.8*(s...
2009 Feb 06
1
Using subset in validate() in Design, what is the correct syntax?
Hi I am trying to understand how to get the validate() function in Design to work with the subset option. I tried this: ovarian.cph=cph(Surv(futime, fustat) ~ age+factor(ecog.ps)+strat(rx), time.inc=1000, x=T, y=T, data=ovarian) validate(ovarian.cph) #fine when no subset is used, but the following two don't work: > validate(ovarian.cph, subset=ovarian$ecog.ps==2) Error in order(c(1L, 1L, 1L, 2L, 1L, 1L, 2L, 2L, 1L,...
2010 May 22
0
Modeling time varying effects in with cph: how to ?
...amp;lpg=PP1&hl=it&pg=PA147#v=onepage&q&f=false http://finzi.psych.upenn.edu/R/Rhelp02/archive/52828.html It seems that SAS is more well-suited to this purpose, as explained in the links above, but i do not have enough time to learn SAS. I think i should use something like this: cph(Surv(start,end,status)~a.factor+a.factor:start) but i'm not sure, specially after Thernau's reply to my previous post. Assuming i'm doing well, i'd prefer to use cph because of the rms bootstrap validation facilities. Unfortunately cph doesn't wanto to model an interaction te...
2011 Oct 11
1
restricted cubic spline within survfit.cph in the package rms
Hello,   does anyone have an example on how to use restricted cubic splines function rcs within survfit.cph, if cph (Cox Proportional Hazard Regression) was done with restricted cubic splines (which I made to work)? Thank you. > [[alternative HTML version deleted]]
2014 Jul 05
1
Predictions from "coxph" or "cph" objects
...experimenting with the survival and rms packages for this. I'm simply trying to obtain the expected survival time (as opposed to the probability of survival at a given time t). I can't seem to find an option from the "type" argument in the predict methods from coxph{survival} or cph{rms} that will give me expected survival times. library(rms) options(na.action=na.exclude) # retain NA in predictions fit <- coxph(Surv(time, status) ~ age + ph.ecog, lung) fit2 <- cph(Surv(time, status) ~ age + ph.ecog, lung) head(predict(fit,type="lp")) head(predict(fit2,type=&q...