search for: regmat

Displaying 3 results from an estimated 3 matches for "regmat".

Did you mean: regmap
2012 Aug 23
1
All possible models with nls()
...esponse # first script I've tried mod <- 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,...
2012 Dec 09
1
Error message "cs_lu(A) failed: near-singular A (or out of memory)"
Hi there everyone, I have the following model (this is naturally a simplified version just for showing my problem, in case you're wondering this is a translog cost function with the associated cost share equations): C ~ á + â1 log X + â2 log Y + ã1 log Z + ã2 log XX C1 ~ â1 + â2 log YY + ã1 log ZZ Then I have some restrictions on the coefficients, namely that the sum of â equal 1 and the
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,