search for: nvmax

Displaying 20 results from an estimated 20 matches for "nvmax".

Did you mean: nmax
2008 Mar 14
1
Forward Selection with regsubsets
Hi, I would like to perform a forward selection procedure on a data set with 6 observations and 10 predictors. I tried to run it with regsubsets (I set nvmax=number of observations) but I keep getting these warning messages: Warning messages: 1: 5 linear dependencies found in: leaps.setup(x, y, wt = weights, nbest = nbest, nvmax = nvmax, 2: nvmax reduced to 5 in: leaps.setup(x, y, wt = weights, nbest = nbest, nvmax = nvmax, I think the problem...
2005 May 11
2
Regsubsets()
...v + tad + no.stops.km + av.stop.T + a + sd.a + a.max + d + sd.d + d.max + RPA + P + perc.stop.T + perc.a.T + perc.d.T + RPS + RPSS + sd.P.acc + P.dec + da.acc.1 + RMSACC + RDI + RPSI + P.acc + cov.v + cov.a + cov.d + sd.P + sd.v.run + RCS + T + mass.fin, data = DATASET, weights = count, nbest = 10, nvmax = 35, method = "exhaustive") I do however encounter the following warning message which I do not understand: > Reordering variables and trying again: Warning messages: 1: 14 linear dependencies found in: leaps.setup(x, y, wt = wt, nbest = nbest, nvmax = nvmax, force.in = force.in,...
2010 Jan 08
0
inclusion of "intercept=FALSE" in regsubsets() in leaps package produces an error
...data and or the statistics I am trying to do, or may be arising due to the way leaps works internally. Unfortunately, I am not yet savvy enough to tell why. I can say that this statement works (or at least works to the degree I expect): b <- regsubsets(FUND~.,data=all, intercept=TRUE, nbest=1, nvmax=8, really.big=T, method="forward") It does produce a warning: Warning message: In leaps.setup(x, y, wt = wt, nbest = nbest, nvmax = nvmax, force.in = force.in, : 2 linear dependencies found But I can appreciate that and can reduce my dataset to deal with it. However, if I use this...
2005 Mar 02
1
Leaps & regsubsets
...I am not able to define the function in such a way that is gives satisfactory results. library(leaps) data <- read.table('C:/test_plot_sum2.txt', header = TRUE) attach(data) nox <- data[,1] cnt <- data[,2] vars <- data[,3:48] leaps.setup(x = vars, y = nox, wt = cnt, nvmax = 1) leaps(x = vars, y = nox, wt = cnt, method = "Cp", nbest = 2, names = names(vars)) Error in leaps(x = vars, y = nox, wt = cnt, method = "Cp", nbest = 2, : leaps does not allow more than 31 variables; use regsubsets() regsubsets(x = vars, y = nox, weights...
2009 May 20
1
Error with regsubset in leaps package - vcov and all.best option (plus calculating VIFs for subsets)
...edure on some ecological datasets using the regsubsets function in the leaps package. The dataset contains 43 predictor variables plus the response (logcount) all in a dataframe called environment. I am implementing it as follows: library(leaps) subsets<-regsubsets(logcount~.,data=environment,nvmax=10,nbest=2,really.big=FALSE,method="exhaustive") ###the subset regression runs fine when i run it as above and i can get all the usual summaries ###The problem comes when i try and get it to output the variance convariance matric by adding the option vcov=TRUE ##When I do that i get the...
2004 Jan 29
1
a question regarding leaps
Hi, I'm using regsubsets from the leaps package to select subsets of variables. I'm calling the function as lp <- regsubsets(x,y,nbest=5,nvmax=9) Then I call plot to see which variables turned up in the models. I use the R^2 scale and see my best model had a R^2 of 0.62. However when I make a linear model using lm() with the same x my R^2 is 0.45. Should'nt I be seeing the same value of R^2? I must be making a mistake somewhere but...
2004 Feb 06
0
error message from regsubsets
Hi, I'm using regsubsets and it works fine when nvmax = 4. However when I go for any value above 4, I get the error: Warning message: XHAUST returned error code -999 in: leaps.exhaustive(a, really.big = really.big) I'm calling regsubsets as: lp <- regsubsets(x,y,nbest=1,nvmax=5,intercept=T,really.big=T, method="exhaustive") x is a...
2010 Apr 08
1
Error in leaps.setup
Hullo, I am trying to use the leaps package, & keep getting the following error: Error in leaps.setup(x, y, wt = wt, nbest = nbest, nvmax = NCOL(x) + int, : y and x different lengths My data set is attached below. I am rather new to R, & would appreciate any help that could be given. Thanks. http://n4.nabble.com/file/n1755941/lr04.txt lr04.txt -- View this message in context: http://n4.nabble.com/Error-in-leaps-setup-tp...
2009 Sep 13
1
Help with Loop Please!
.... The package leaps can help me to generate all possible variable subsets, but I’ll appreciate your guidance as of how to generate one model for each of those possible subsets. I’m new in R! Thanks in advance for your help. library(leaps) subsets <- regsubsets( y ~ . , data=freeny, nbest=100, nvmax=5, method="exhaustive", really.big=T) subset.models <- summary(subsets)$which now fit one lm for each possible combination of variables. [[alternative HTML version deleted]]
2012 Sep 25
2
Regsubsets model selection
...iable. Now I want to select the best adj. R squared model by using the regsubsets command, so I code: > plot(regsubsets(Gesamt ~ CommunistSocialist + CountrySize + GNI + Lifeexp + Schoolyears + ExpMilitary + Mortality + + PopPoverty + PopTotal + ExpEdu + ExpHealth, data=olympiadaten, nbest=1, nvmax=12), scale='adjr2') Then I get the picture I attached. The problem is, that the best model has an adjusted R squard of 0.49. But if I regress e.g. my y on only the variable PopTotal, then I already get an adjusted R squared of 0.779! So this simple model is way better but it is not recogni...
2011 Dec 29
1
How would I rewrite my code so that I can implement the use of multicore on an Rstudio server to run regsubsets using the "exhaustive" method? The data has 1200 variables and 9000 obs so the code has been shortened here:
...would I rewrite my code so that I can implement the use of multicore on an Rstudio server to run regsubsets using the "exhaustive" method? The data has 1200 variables and 9000 obs so the code has been shortened here: model<-regsubsets(price~x + y + z + a + b + ...., data=sample, nvmax=500, method=c("exhaustive")) Our server is a quad core 7.5 gb ram, is that enough for an equation like this? -- View this message in context: http://r.789695.n4.nabble.com/How-would-I-rewrite-my-code-so-that-I-can-implement-the-use-of-multicore-on-an-Rstudio-server-to-run-tp4241671p4...
2008 May 07
1
help with regsubsets
...to state my question as appropriately as possible. I am running R version 2.7 with Windows XP and have recently been exploring the use of the function regsubsets in the leaps package in order to perform all-subsets regression. So, I'm calling the function as: sub=regsubsets(X,Y,nbest=5,nvmax=maxnv,method="exhaustive",really.big=F) I'm dealing with 14 observations and 23 variables and I'm aware of the linear dependencies that arise in these situations. I also know that regsubsets performs a branch-and-bound algorithm and that at times it is necessary to reorder the...
2016 May 26
2
Error en subset selection
Hola a todas, Quiero realizar un subset selection usando el paquete leaps, entre mis variables explicativas tengo rezagos de las mismas, por tanto tienen datos NA. sin embargo, al tratar de realizar cross validation me pide que los datos esten en formato data.frame con lo que me arroja un error al ejecutar el algoritmo. Mi pregunta es cómo puedo forzar en un data.frame en que tengo variables
2013 Mar 01
1
predict.loess() segfaults for large n?
...am segfaulting when using predict.loess() (checked with r62092). I've traced the source with the help of valgrind (output pasted below) and it appears that this is due to int overflow when allocating an int work array in loess_workspace(): liv = 50 + ((int)pow((double)2, (double)D) + 4) * nvmax + 2 * N; where liv is an (global) int. For D=1 (one x variable), this overflows at approx N = 4089 where N is the fitted sample size (not prediction sample size). I am aware that you are in the process of introducing long vectors but a quick fix would be to error when predict.loess(..., se=TRUE)...
2010 Mar 10
0
leaps error
...2.10.0 platform: i486-pc-linux-gnu I'm trying to perform model selection from a data.frame object (creatively named "data") using the leaps function, and I run across the following error: > leaps(data[,3:7], data[,1], nbest = 10) Error in leaps.setup(x, y, wt = wt, nbest = nbest, nvmax = NCOL(x) + int, : character variables must be duplicated in .C/.Fortran Here is a sample of what 'data' looks like: ethanol flask batch delabso delgluc delglyc ph 1 0.00 1 0 1.41 0.0 0.7 1 2 0.00 2 0 1.33 0.0 0.6 9 3 0.00 2...
2011 Feb 22
1
regsubsets {leaps}
Hi, I'd like to run regsubsets for model selection by exhaustive search. I have a list with 20 potential explanatory variables, which represent the real and the imaginary parts of 10 "kinds" of complex numbers: x <- list(r1=r1, r2=r2, r3=r3, ..., r10=r10, i1=i1, i2=i2, i3=i3, ..., i10=i10) Is there an easy way to constrain the model search so that "r"s and
2007 Dec 12
0
Hep on using GAM() in R
...,span=0.05)+lo(lstday2004,span=0.05)+lo(slope,span= 0.05)+lo(ndvi2004,span=0.05)+lo(elevation,span=0.05 )+disbinary,family=binomial(logit),data=point) #span is 0.05 #22 warnings() > warnings() 1: In lo.wam(x, z, wz, fit$smooth, which, fit$smooth.frame, ... : k-d tree limited by memory; nvmax= 226 2: In lo.wam(x, z, wz, fit$smooth, which, fit$smooth.frame, ... : pseudoinverse used at 14923 3: In lo.wam(x, z, wz, fit$smooth, which, fit$smooth.frame, ... : neighborhood radius 1 4: In lo.wam(x, z, wz, fit$smooth, which, fit$smooth.frame, ... : reciprocal condition number 0...
1997 Oct 10
1
R-beta: leaps() and subsets() functions
Dear R-users, Is anyone successfully using leaps() and particularly subsets() (contributed function) in R? When I attempt to run them with modest matrices, R promptly faults and dumps the core. Also, how does one use subsets.formula() within subsets()? R : Copyright 1997, Robert Gentleman and Ross Ihaka Version 0.50 Alpha-4 (September 10, 1997) R-base-0.50.a4-1.i386.rpm
2005 Jun 18
1
loess returns different standard errors for identical models (PR#7956)
Full_Name: Benjamin Tyner Version: 2.1.0, 4/18/2005 OS: i686-redhat-linux-gnu Submission from: (NULL) (4.64.8.220) # Just run my.test() below in a newly opened R session. Once too many models have been fit (~20 on my system), the computed standard error jumps to a different value. This is (superficially) due to a different residual sum of squares, not a different one.delta. No other aspect of
2012 Jun 01
4
regsubsets (Leaps)
Hi i need to create a model from 250 + variables with high collinearity, and only 17 data points (p = 250, n = 750). I would prefer to use Cp, AIC, and/or BIC to narrow down the number of variables, and then use VIF to choose a model without collinearity (if possible). I realize that having a huge p and small n is going to give me extreme linear dependency problems, but I *think* these model