search for: allmodelslist

Displaying 2 results from an estimated 2 matches for "allmodelslist".

2012 Aug 23
1
All possible models with nls()
...- list() for (i in 1:3) { mod[[i]] <- nls(y~exp(c+(a1*x1)+(a2*x2) )/ (1+exp(c+(a1*x1)+(a2*x2))) ,start=list(a1=-0.2,a2=-0.2,c=0.2)) print(summary(mod[[i]])) } #second script I've tried regressors<-c("x1","x2") regMat<-expand.grid(c(T,F),c(T,F)) regMat allModelsList <- apply(regMat,1, function(x)as.formula(nls(y~exp(c+(a1*x1)+(a2*x2) )/ (1+exp(c+(a1*x1)+(a2*x2))) ,start=list(a1=-0.2,a2=-0.2,c=0.2)))) allModelsList allModelsResults <- lapply(allModelsList, function(x) nls(x, start=list(a1=-0.2,a2=-0.2,c=0.2))) allModelsResults...
2010 May 19
8
Generating all possible models from full model
Is there a function that will allow me to run all model iterations if I specify a full model? I am using information criteria to choose between possible candidate models. I have been writing out all possible model combinations by hand, and I am always worried that I am missing models or have made a mistake somewhere. It is also difficult to alter models if I want to change a term. For example,