search for: cfit

Displaying 12 results from an estimated 12 matches for "cfit".

Did you mean: cfi
2012 Apr 29
0
need help with avg.surv (Direct Adjusted Survival Curve)
...fac", var.values=c(1,2,3,4), data=larynx) Error in `contrasts<-`(`*tmp*`, value = contrasts.arg[[nn]]) :    contrasts apply only to factors" If try using var.values = c ("1","2","3","4") option, I get the following error: "Error in xmat %*% cfit$coef : non-conformable arguments In addition: Warning message: In model.matrix.default(Terms, mf, contrasts = contrast.arg) :   variable 'stage.fac' converted to a factor" Please advise me on what I am doing wrong! Regards, Manish Dalwani University of Colorado library(survival) lib...
2012 Apr 30
0
need help with avg.surv (Direct Adjusted Survival Curve), Message-ID:
...c", var.values=c(1,2,3,4), data=larynx) Error in `contrasts<-`(`*tmp*`, value = contrasts.arg[[nn]]) : contrasts apply only to factors" If try using var.values = c ("1","2","3","4") option, I get the following error: "Error in xmat %*% cfit$coef : non-conformable arguments In addition: Warning message: In model.matrix.default(Terms, mf, contrasts = contrast.arg) : variable 'stage.fac' converted to a factor" Please advise me on what I am doing wrong! Regards, Manish Dalwani University of Colorado library(survival) li...
2006 Sep 25
2
rpart
Dear r-help-list: If I use the rpart method like cfit<-rpart(y~.,data=data,...), what kind of tree is stored in cfit? Is it right that this tree is not pruned at all, that it is the full tree? If so, it's up to me to choose a subtree by using the printcp method. In the technical report from Atkinson and Therneau "An Introduction to recur...
2013 Sep 26
0
ConstrOptim Function (Related to Constraint Matrix/ui/ci error)
Hello All, I am stuck in the following problem. Cexpt=c(0,25,50,100,150,300,250,125,40) t=c(0,0.2,0.4,0.6,1,4,8,12,24) theta0= vector of 6 parms (My initial parameter) A=Constraint matrix (hopefully 6*6) B= Constraint vector of length 6) Cfit=function(t,theta){ J(t)=function(theta,t) Cfit=function(J(t),constant) return(Cfit) } loss=function(theta,t,Cexpt) { sum(Cexpt- Cfit(t,theta))^2} Final=constrOptim(theta0,loss,t,Cexpt,NULL,A,B) When i try to fit it gives me error ERROR IN UI%*% THETA : MATRIX/VE...
2012 Jun 05
1
model.frame and predvars
..., 3).2 ns(age, 3).3 1 306 1 0.4443546 0.3286161 0.1900511 2 455 0 0.5697239 0.3618440 -0.1297479 > levels(ltemp[[2]]) [1] "0" "1" > levels(lfit$model[[2]]) [1] "0" "1" "2" "3" > cfit <- coxph(Surv(time, status) ~ factor(ph.ecog) + ns(age,3), lung) > model.frame(cfit, data= lung[1:2,]) Surv(time, status) factor(ph.ecog) ns(age, 3).1 ns(age, 3).2 ns(age, 3).3 1 306 1 0.4443546 0.3286161 0.1900511 2 455 0...
2009 Apr 03
2
Schoenfeld Residuals
Dear All, Sorry to bother you again. I have a model: coxfita=coxph(Surv(rem.Remtime/365,rem.Rcens)~all.sex,data=nearma) and I'm trying to do a plot of Schoenfeld residuals using the code: plot(cox.zph(coxfita)) abline(h=0,lty=3) The error message I get is: Error in plot.window(...) : need finite 'ylim' values In addition: Warning messages: 1: In sqrt(x$var[i, i] * seval) : NaNs
2007 Nov 13
2
plotting coxph results using survfit() function
i want to make survival plots for a coxph object using survfit function. mod.phm is an object of coxph class which calculated results using columns X and Y from the DataFrame. Both X and Y are categorical. I want survival plots which shows a single line for each of the categories of X i.e. '4' and 'C'. I am getting the following error: > attach(DataFrame) >
2009 Sep 04
1
Problem with locfit( ... , family="hazard")
I'm having difficulties with plot.locfit.3d, at least I think that is the problem. I have a large dataframe (about 4 MM cases) and was hoping to see a non-parametric estimate of the hazard plotted against two variables: > fit <- locfit(~surv.yr+ ur_protein + ur_creatinine, data=TRdta, cens = 1-death, family = "hazard&...
2010 Jun 18
1
ow to apply a panel function to each of several data series plotted on the same graph in lattice
...ction) through each of multiple data series plotted on the same graph? Specifically, while one can do something like xyplot(a+b+c~x) which plots three series, a,b & c, but can one automatically fit lines through each of them? I suppose one could generate three more variables afit, bfit, and cfit with a model & predict and then plot them, but wondered if there was an easier way. Thank you for any advice. Here is an example: # use an example panel function using smooth.spline; however, the issue relates to all panel functions # a panel function to fit smoothed lines through data pane...
2011 Sep 28
1
survexp with large dataframes
...p=0 Score (logrank) test = 246358 on 11 df, p=0, Robust = 4574 p=0 (Note: the likelihood ratio and score tests assume independence of observations within a cluster, the Wald and robust score tests do not). > dev.fit <- survexp( ~ 1, ratetable=mod1, data=dev) Error in survexp.cfit(cbind(as.numeric(X), R), Y, conditional, FALSE, : cannot allocate memory block of size 15.2 Gb
2001 Nov 12
2
check() warnings for survival-2.6
...quot; "print.summary.survreg" [29] "print.survdiff" "print.survexp" [31] "print.survreg.penal" "residuals.survreg.penal" [33] "summary.coxph.penal" "summary.ratetable" [35] "survexp.cfit" "survpenal.fit" [37] "survreg.fit" "tcut" 3) non-matching docs: * checking for code/documentation mismatches ... WARNING $as.date $as.date$code [1] "x" "order" "..." $as.date...
2007 Nov 23
0
R users in Cyprus
...bination of covariates in the model. You cannot get what you are asking for, i.e., distinct levels of X while ignoring Y, from survfit. What you need to do is create a data frame containing values for the curves that you want, e.g., mydata <- data.frame(X=c(1,2,3,4), y=c(8,8,8,8)) cfit <- survfit(mod.phm, newdata=mydata) plot(cfit, lty=1:4) People often choose a 'common' value of y for the plot. Arguably the better approach is to average over the levels of y. For this, I would recommend that you read chapter 10 of Therneau and Grambsch, Modeling Survival Data....