The lme objects, as with any class, are designed to contain everything they may need for any function that has been written to be called on it. If you want to just use the bare bones you will need to pull out only what you need and reassign the class...

r,feature-selection,caret,nlme

It wouldn't be impossible but really difficult. You would need to define the right lmd functions (see the documentation page). If you are fitting a random effects model, you would also need to do custom holdout specifications so that you are holding out whatever the independent experimental unit is. So,...

This is due to a bias correction term; it's documented in ?summary.lme. adjustSigma: an optional logical value. If ‘TRUE’ and the estimation method used to obtain ‘object’ was maximum likelihood, the residual standard error is multiplied by sqrt(nobs/(nobs - npar)), converting it to a REML-like estimate. This argument is only...

I would use combn in this occasion, see the example below: Example Data Response <- runif(100) A <- runif(100) B <- runif(100) C <- runif(100) Solution a <- c('A','B','C') #the names of your variables b <- as.data.frame(combn(a,2)) #two-way combinations of those using combn #create the formula for each model my_forms...

Here you go: sapply(fit,function(x) summary(x)$r.squared) 11 12 0.9657143 0.9657143 Or to do everything at once: sumfun <- function(x) c(coef(x),summary(x)$r.squared) t(sapply(fit,sumfun)) (you need to transpose the results from sapply to get the table as specified above). Then use names() <- or setNames() to get the column names the way you want...

It may be informative for users to know that I finally solved this with what turned out to be a simple solution (with help from a friend). Since exp(a+b) = exp(a)*exp(b), the equation can be rewritten: Weight ~ I(A/(1+((A/1.022)-1) * exp(v0*Age + v1*Sum.T)) Which fits without any problems. In general,...

You have very bad data coverage, i.e. no data in the upwards curving part of the logistic function and one influential data point. In the following I use a different parametrization of the logistic function. First let's do an nls fit with the selfstarting function: plot(Weight ~ Age, data=DF) fit...

r,statistics,mixed-models,nlme

I'm going to try my best to help here, but if someone else has a better answer, of course please follow their advice. First, start by building your unconditional model - a model without any predictor or independent variables. In your case, it looks like A represents the level 2...