similar to: keep function in stepAIC

Displaying 20 results from an estimated 200000 matches similar to: "keep function in stepAIC"

2005 Jun 23
0
Error in stepAIC function using a survival model
I keep getting the same error in my survival analysis. I have access to a very large database but am just using small subsets to get some results. In this particular subset there is 50 explanatory variables(both factors of many levels and covariates) and 117 data pieces with some of the data being censored. I am using the stepAIC command to find my model. My initial model is built from all
2011 Nov 29
0
Any function\method to use automatically Final Model after bootstrapping using boot.stepAIC()
Hi List, Being new to R, I am trying to apply boot.stepAIC() for Model selection by bootstrapping the stepAIC() procedure. I had gone through the discussion in various thread on the variable selection methods. Understood the pros and cons of various method, also going through the regression modelling strategies in rms. I want to read Final model or Formula or list of variables automatically
2012 Oct 09
1
why does R stepAIC keep unsignificant variables?
Ran a bunch of variables in R and the final result of StepAIC is as below: Why are the first 5 variables kept in the stepwise result?? Are the last 4 variables finally chosen after Stepwise? Thanks Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.315e-01 2.687e-01 0.490 0.63611 Core_CPI__ 1.290e-02 7.496e-03 1.721 0.11927 GDP_change -3.482e-03 2.075e-03 -1.678 0.12767
2009 Dec 16
1
regularised incomplete beta function
Dear: I am trying to work out the regularised incomplete beta function in R. I searched google on this and found UCS library. But I can not find this in R packages. Does anyone have use this before or how to insert UCS in R? Many Thanks! Xin Xin ------- Dr.Xin Shi Senior Lecturer in Statistics Manchester Metropolitan University Business School Aytoun Building Aytoun Street Manchester M1
2012 Sep 19
0
Lowest AIC after stepAIC can be lowered by manual reduction of variables (Florian Moser)
A few general comments about stepwiseAIC and a suggestion of how to select models a) Apart form the problem, that stepwise selection is not a garanty to get the best model, you need to have a lot of data to avoid overfitting if your model includes 7 parameter plus interactions (> 10 observations per parameter is what you are ideally looking for). b) Have a look at Anderson and Burnham's
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 <-
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
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
2009 Nov 30
1
Using stepAIC to produce a p-value for when a particular variable was taken out of the model
Dear all, I have decided after much deliberation to use backward elimination and forward selection to produce a multivariate model. Having read about the problems with choosing selection values I have chosen to base my decisions of inclusion and exclusion on the AIC and am consequently using the stepAIC function. This post however does not relate to whether or not this is the correct decision!
2017 Aug 22
0
boot.stepAIC fails with computed formula
OK, here's the problem. Continuing with your example: strt1 <- lm(y1 ~1, dat) strt2 <- lm(frm1,dat) > strt1 Call: lm(formula = y1 ~ 1, data = dat) Coefficients: (Intercept) 41.73 > strt2 Call: lm(formula = frm1, data = dat) Coefficients: (Intercept) 41.73 Note that the formula objects of the lm object are different: strt2 does not evaluate the formula. So
2002 Dec 11
0
stepAIC and the keep argument
I would like to "keep" the call formulae from the stepAIC sequence. Does anyone know of an example showing how to use the keep argument? Help would be much appreciated. Ross Darnell Email: <r.darnell at shrs.uq.edu.au>
2004 Mar 29
1
StepAIC
Dear list, here is an example of stepAIC that I do not understand. The data is n=42, Lage is the only factor and there are four other variables treated as continuous. First you see the stepAIC-forward solution (fs7). The strange thing here is that apparently not all interactions are tried for inclusion, but only WQ:Lage. In particular, I think that WFL:Lage should be tried in the last two
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
2009 May 05
0
stepAICc function (based on MASS:::stepAIC.default)
Dear all, I have tried to modify the code of MASS:::stepAIC.default(), dropterm() and addterm() to use AICc instead of AIC for model selection. The code is appended below. Somehow the calculations are still not correct and I would be grateful if anyone could have a look at what might be wrong with this code... Here is a working example: ## require(nlme) model1=lme(distance ~ age + Sex, data =
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
2017 Aug 23
0
boot.stepAIC fails with computed formula
It seems that if you build the formula as a character string, and postpone the "as.formula" into the lm call, it works. instead of frm1 <- as.formula(paste(trg,"~1")) use frm1a <- paste(trg,"~1") and then strt <- lm(as.formula(frm1a),dat) regards, Heinz Stephen O'hagan wrote/hat geschrieben on/am 23.08.2017 12:07: > Until I get a fix that works, a
2012 Mar 03
1
Problem running stepAIC within a function.
Hi I need to a function that automatically fits a regression to data, using the stepAIC. I've ran the code manually and it works fine. However, when I run the function on the same data, the following error occurs: Problem in regimp(fullsim = simt, fullsim1 = simt1,..: Length of (weights) (variable 4) is 4271 != length of others (4278) I got the function to output the length of the dataset
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]
2008 Jun 21
1
stepAIC {MASS}
In a generalized linear model with k covariates, there are 2(kth power) - 1 possible models (excluding interactions). Awhile ago a posting to R-help suggested Model Selection and Multimodel Inference, 2nd ed, by Burnham and Anderson as a good source for understanding model selection. They recommend (page 71) computing AIC differences over all candidate models in the set of possible models. After