Displaying 2 results from an estimated 2 matches for "bodyfat".
2003 Sep 27
2
frustration with ave()
Dear All,
I'm confused why I'm getting NA's in the output from ave() (at the end). Any
help would be greatly appreciated. I'm including the data in case that is where
the problem lies:
> f <- factor(FAMILYID)
> bodyfat <- na.omit(data.frame(loessBODYFAT, f))
> bodyfat$loessBODYFAT
[1] -8.950153e-01 -9.175285e-01 3.174061e-01 -2.101260e-01 2.534174e-02
[6] 1.846599e-01 8.322865e-01 1.348331e+00 1.241318e+00 1.634000e+00
[11] 1.611048e+00 6.824926e-01 2.346168e+00 2.924673e-01 6.919381e-0...
2008 Oct 15
0
gamboost partial fit prediction
...ng code (I am aware of the additive structure of the estimation,
therefore the excerpt below is supposed to be only a part of my final
solution). If the problem does not become more obvious I will provide more
details.
Thanks in advance,
AS
#### R code ####
rm(list=ls(all=T))
library(mboost)
data(bodyfat)
## Model fit
bf_gam <- gamboost(DEXfat ~ ., data = bodyfat)
aic <- AIC(bf_gam)
fit <- bf_gam[mstop(aic)]
## partial prediction
input <- fit$data$input
i <- sort(unique(fit$ensemble[,1]))[1]
a <- fit$ensembles[fit$ensemble[,1]==i]
### Why this does not work?
a[[1]][[1]]$predict...