Hi, I repeatedly estimate the same gam model (package mgcv) using different subsets of the data. A naive approach is, of course, to estimate the model from scratch for each of the subsets. However I wonder if there are some computations that can be "factored out" for the sake of efficiency? To be specific here is a stylized example of what I do now (which I'd like to make more efficient): gamA <- vector("list", 100) for (i in seq(length(gamA))) { gamA[[i]] <- gam(y ~ x2 + s(x1, by=x2), data=myData, subset=sample(nrow(myData), 10000)) } Thanks, Vadim
[[alternative HTML version deleted]] ______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html