Displaying 20 results from an estimated 7000 matches similar to: "R-beta: leaps() and subsets() functions"
Error with regsubset in leaps package - vcov and all.best option (plus calculating VIFs for subsets)
2009 May 20
1
Error with regsubset in leaps package - vcov and all.best option (plus calculating VIFs for subsets)
Hi all
I am hoping this is just a minor problem, I am trying to implement a best subsets regression procedure 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)
1997 Aug 15
2
R-beta: Polynomials in lm/glm
R users,
I was a bit surprised to find that when I attempted to add a polynomial
term to a linear model using either lm or glm as could be done in S
resulted in a fit without that term included and without warning(!!), e.g.
> lm(response ~ x + x^2, data).
As far as I can gather, there is no poly() yet in R, and if lm/glm do not
allow functions of variables as their formula arguements, is
2005 Mar 02
1
Leaps & regsubsets
Hello
I am trying to use all subsets regression on a test dataset consisting
of 11 trails and 46 potential predictor variables.
I would like to use Mallow's Cp as a selection criterion.
The leaps function would provide the required output but does not work
with this many variables (see below).
The alternative function regsubsets should be used, but I am not able to
define the function in
1998 Feb 04
1
R-beta: Functionality of tck=1, and mtext()
In the version of R that I am running I have found two advertised
features that don't appear to work correctly:
Version 0.61.0 Alpha (December 21, 1997)
(installed using r-base-0.61.0-2.i386.rpm)
1. mtext adj parameter is seriously offset to the right. For example:
> par(oma=c(0,0,3,0))
> mtext("Try this", side=3, outer=T) # nothing is observed on x11
> mtext("Now
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
1998 Mar 27
1
R-beta: Including an evaluated function in text expression
R-users,
I would like to take advantage of R's mathematical typesetting
capabilities in the graphical environment using text(...,
expression(...)), however, I can't figure out how to include in the
expression some evaluated function. For example,
> x <- 1:8
> plot(1:10, 1:10)
> text(5, 5, expression(sum(x[i], i == 1, length(x))) # would like "8"
1998 Jun 25
1
R-beta: PostScript tick marks in 62.1
R-users/developers,
I am loosing tick marks that I add to a plot with axis() when plotting
to the postscript device. They show up fine on the x11 device, and work
with the postscript device when the default tickmarks are used (those
added by plot()).
I am using R-62.1 from the RedHat5.0 rpm's on i86 Linux.
Do later snapshots correct this, or is this a running bug in R awaiting
the
1998 Jun 25
1
R-beta: PostScript tick marks in 62.1
R-users/developers,
I am loosing tick marks that I add to a plot with axis() when plotting
to the postscript device. They show up fine on the x11 device, and work
with the postscript device when the default tickmarks are used (those
added by plot()).
I am using R-62.1 from the RedHat5.0 rpm's on i86 Linux.
Do later snapshots correct this, or is this a running bug in R awaiting
the
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:
2009 Sep 13
1
Help with Loop Please!
Hi,
I’d like to fit one GLM model for each possible combination of inputs (i.e.
exhaustive search). 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,
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
2005 May 11
2
Regsubsets()
Dear List members
I am using the regsubsets function to select a few predictor variables
using Mallow's Cp:
> sel.proc.regsub.full <- regsubsets(CO2 ~ v + log(v) + v.max + sd.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 +
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 =
2010 Jan 08
0
inclusion of "intercept=FALSE" in regsubsets() in leaps package produces an error
Hello,
I have encountered a problem which may be arising from details of my 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,
2008 May 07
1
help with regsubsets
Hi,
I'm new to R and this mailing list, so I will attempt 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:
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
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
1999 Oct 25
2
leaps: XHAUST returned error code -999
Hi there,
This problem has been dogging me for a bit, and I'm trying to
figure out why. When running the the subsets function in the leaps
library, R is giving me the following error message
> lvodsub <- subsets(pred, resp$LVOD)
Warning message:
XHAUST returned error code -999 in: leaps.exhaustive(a, really.big =
really.big)
but this still happens if I add the really.big option:
2010 Feb 12
1
all possible subsets, with AIC
Hello,
I have a question about doing ALL possible subsets regression
with a general linear model. My goal is to produce cumulative Akaike
weights for each of 7 predictor variables-to obtain this I need R to:
1.
Show me ALL possible subsets, not just the best possible subsets
2. Give
me an AIC value for each model (instead of a BIC value).
I have tried to
do this in library(RcmdrPlugin.HH),
2010 Mar 10
0
leaps error
R version: 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