Displaying 3 results from an estimated 3 matches for "bfit".
Did you mean:
bfi
2012 Apr 29
0
need help with avg.surv (Direct Adjusted Survival Curve)
... tframe[,var.num] <- var.values
xmat <- model.matrix(cfit,data=tframe)[,-1]
tlps <- as.vector(xmat%*%cfit$coef)
names(tlps) <- var.values
obs.off <- tlps[as.character(obs.var)]
explp.off <- exp(outer(lps - obs.off ,tlps,"+"))
bfit <- survfit.coxph(cfit, se.fit = F)
fits <- outer(bfit$surv,explp.off,function(x,y) x^y)
avg.fits <-
apply(sweep(fits,2,weights,"*"),c(1,3),sum)/sum(weights)
dimnames(avg.fits) <- list(NULL,var.values)
list(time=bfit$time,fits=avg.fit...
2012 Apr 30
0
need help with avg.surv (Direct Adjusted Survival Curve), Message-ID:
...tframe[,var.num] <- var.values
xmat <- model.matrix(cfit,data=tframe)[,-1]
tlps <- as.vector(xmat%*%cfit$coef)
names(tlps) <- var.values
obs.off <- tlps[as.character(obs.var)]
explp.off <- exp(outer(lps - obs.off ,tlps,"+"))
bfit <- survfit.coxph(cfit, se.fit = F)
fits <- outer(bfit$surv,explp.off,function(x,y) x^y)
avg.fits <-
apply(sweep(fits,2,weights,"*"),c(1,3),sum)/sum(weights)
dimnames(avg.fits) <- list(NULL,var.values)
list(time=bfit$time,fits=avg...
2010 Jun 18
1
ow to apply a panel function to each of several data series plotted on the same graph in lattice
...panel function) 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...