similar to: Problem about step and stepAIC

Displaying 20 results from an estimated 4000 matches similar to: "Problem about step and stepAIC"

2009 Mar 18
3
Extreme AIC or BIC values in glm(), logistic regression
Dear R-users, I use glm() to do logistic regression and use stepAIC() to do stepwise model selection. The common AIC value comes out is about 100, a good fit is as low as around 70. But for some model, the AIC went to extreme values like 1000. When I check the P-values, All the independent variables (about 30 of them) included in the equation are very significant, which is impossible, because we
2006 May 05
1
trouble with step() and stepAIC() selecting the best model
Hello, I have some trouble using step() and stepAIC() functions. I'm predicting recruitment against several factors for different plant species using a negative binomial glm. Sometimes, summary(step(model)) or summary(stepAIC(model) does not select the best model (lowest AIC) but just stops before. For some species, step() works and stepAIC don't and in others, it's the opposite.
2003 Aug 27
1
Problem in step() and stepAIC() when a name of a regressors has b (PR#3991)
Hi all, I've experienced this problem using step() and stepAIC() when a name of a regressors has blanks in between (R:R1.7.0, os: w2ksp4). Please look at the following code: "x" <- c(14.122739306734, 14.4831100207131, 14.5556459667089, 14.5777151911177, 14.5285815352327, 14.0217803203846, 14.0732571632964, 14.7801310180502, 14.7839362960477, 14.7862217992577)
2003 May 08
2
Forward Stepwise regression with stepAIC and step
Dear all, I cannot seem to get the R functions step or stepAIC to perform forward or stepwise regression as I expect. I have enclosed the example data in a dataframe at the end of this mail. Note rubbish is and rnorm(17) variable which I have deliberately added to the data to test the stepwise procedure. I have used wateruse.lm<-lm(waterusage~.,data=wateruse) # Fit full model
2008 Oct 11
1
step() and stepAIC()
The birth weight example from ?stepAIC in package MASS runs well as indeed it should. However when I change stepAIC() calls to step() calls I get warning messages that I don't understand, although the output is similar. Warning messages: 1: In model.response(m, "numeric") : using type="numeric" with a factor response will be ignored (and three more the same.) Checked
2005 Dec 08
1
mle.stepwise versus step/stepAIC
Hello, I have a question pertaining to the stepwise regression which I am trying to perform. I have a data set in which I have 14 predictor variables accompanying my response variable. I am not sure what the difference is between the function "mle.stepwise" found in the wle package and the functions "step" or "stepAIC"? When would one use
2009 May 07
1
Step and stepAIC
Hi all,   I’m using "step" and "stepAIC" for stepwise regression. After each step, I would like to make an additional calculation based on the independent variables that have been selected until this step and their corresponding weights. Where do I have to add this calculation?   And a second question: Is it possible, to define a certain limit of factors for the regression,
2009 Feb 21
1
variable/model selction (step/stepAIC) for biglm ?
Hello dear R mailing list members. I have recently became curious of the possibility applying model selection algorithms (even as simple as AIC) to regressions of large datasets. I searched as best as I could, but couldn't find any reference or wrapper for using step or stepAIC to packages such as biglm. Any ideas or directions of how to implement such a concept ? Best, Tal --
2004 Mar 19
2
Odd behaviour of step (and stepAIC)?
I can only assume I'm betraying my ignorance here, but this is not what I would expect. I'm getting the following from a stepwise selection (with both step and stepAIC): > step(lm(sqrt(Grids)~ SE + Edge + NH), scope=~ (Edge + SE + NH)^2) Start: AIC= 593.56 sqrt(Grids) ~ SE + Edge + NH Df Sum of Sq RSS AIC <none> 2147.0 593.6 + Edge:NH 1
2002 Mar 01
2
step, leaps, lasso, LSE or what?
Hi, I am trying to understand the alternative methods that are available for selecting variables in a regression without simply imposing my own bias (having "good judgement"). The methods implimented in leaps and step and stepAIC seem to fall into the general class of stepwise procedures. But these are commonly condemmed for inducing overfitting. In Hastie, Tibshirani and Friedman
2003 Aug 04
1
Error in calling stepAIC() from within a function
Hi, I am experiencing a baffling behaviour of stepAIC(), and I hope to get any advice/help on what went wrong or I'd missed. I greatly appreciate any advice given. I am using stepAIC() to, say, select a model via stepwise selection method. R Version : 1.7.1 Windows ME Many thanks and best regards, Siew-Leng ***Issue : When stepAIC() is placed within a function, it seems
2006 Oct 11
1
Bug in stepAIC?
Hi, First of all, thanks for the great work on R in general, and MASS in particular. It's been a life saver for me many times. However, I think I've discovered a bug. It seems that, when I use weights during an initial least-squares regression fit, and later try to add terms using stepAIC(), it uses the weights when looking to remove terms, but not when looking to add them:
2003 May 02
2
stepAIC/lme (1.6.2)
Based on the stepAIC help, I have assumed that it only was for lm, aov, and glm models. I gather from the following correspondence that it also works with lme models. Thomas Lumley 07:40 a.m. 28/04/03 -0700 4 Re: [R] stepAIC/lme problem (1.7.0 only) Prof Brian Ripley 04:19 p.m. 28/04/03 +0100 6 Re: [R] stepAIC/lme problem (1.7.0 only) Prof Brian Ripley 06:09 p.m. 29/04/03 +0100 6 Re: [R]
2006 Apr 07
1
how to run stepAIC starting with NULL model?
Hello, I'm trying to figure out how to run the stepAIC function starting with the NULL model. I can call the null model (e.g., lm(y ~ NULL)), but using this object in stepAIC doesn't seem to work. The objective is to calculate AICc. This can be done if stepAIC can be run starting with the NULL model; the (2p(p-1)/(n-p-1))to get AICc would be added to the final step AIC value. Can
2009 May 05
2
Stepwise logistic Regression with significance testing - stepAIC
Hello R-Users,   I have one binary dependent variable and a set of independent variables (glm(formula,…,family=”binomial”) ) and I am using the function stepAIC (“MASS”) for choosing an optimal model. However I am not sure if stepAIC considers significance properties like Likelihood ratio test and Wald test (see example below).     > y <- rbinom(30,1,0.4) > x1 <- rnorm(30) > x2
2017 Jun 08
1
stepAIC() that can use new extractAIC() function implementing AICc
I would like test AICc as a criteria for model selection for a glm using stepAIC() from MASS package. Based on various information available in WEB, stepAIC() use extractAIC() to get the criteria used for model selection. I have created a new extractAIC() function (and extractAIC.glm() and extractAIC.lm() ones) that use a new parameter criteria that can be AIC, BIC or AICc. It works as
2017 Aug 22
1
boot.stepAIC fails with computed formula
Failed? What was the error message? Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, Aug 22, 2017 at 8:17 AM, Stephen O'hagan <SOhagan at manchester.ac.uk> wrote: > I'm trying to use boot.stepAIC for
2007 Jun 05
1
Question using stepAIC
Hi - I use stepAIC to automatically select the model. The stepAIC was applied on polr as follow:objPolr <- polr(formula=myformula, data=dat, method=METHOD);objPolr.step <- stepAIC(objPolr, trace=T);Then R complaints that it doesn't know about 'dat' when it executes the second line. Below is the exact error that I got when executing the stepAIC line above:Error in eval(expr,
2017 Aug 22
0
boot.stepAIC fails with computed formula
The error is "the model fit failed in 50 bootstrap samples Error: non-character argument" Cheers, SOH. On 22/08/2017 17:52, Bert Gunter wrote: > Failed? What was the error message? > > Cheers, > > Bert > > > Bert Gunter > > "The trouble with having an open mind is that people keep coming along > and sticking things into it." > -- Opus (aka
2017 Aug 22
1
boot.stepAIC fails with computed formula
SImplify your call to lm using the "." argument instead of manipulating formulas. > strt <- lm(y1 ~ ., data = dat) and you do not need to explicitly specify the "1+" on the rhs for lm, so > frm2<-as.formula(paste(trg," ~ ", paste(xvars,collapse = "+"))) works fine, too. Anyway, doing this gives (but see end of output)" bst <-