similar to: stepAIC and the keep argument

Displaying 20 results from an estimated 20000 matches similar to: "stepAIC and the keep argument"

2003 Nov 04
2
help with nomogram function
I have fitted a logistic regression model > failed.lr2$call lrm(formula = failed ~ Age + task2 + Age:task2, data = time.long, na.action = na.omit) using the Design package functions and would like to generate a nomogram from this model. the datadist information is generated and stored in > ddist time.long$Age time.long$task2 Low:effect 45
2004 Jun 01
1
WinMenu's question
I am using the Windows menu functions below which will work on the first pass, but if I repeat the same script I cannot get the WinMenuAddItem to work. This is a problem if I change the menu structure and reread the source code I am forced to quit and restart Rgui. "try.menu" <- function(){ OS <- .Platform$OS.type GUI <- .Platform$GUI if (!(OS == "windows" &
2004 Jul 20
1
Histogram without common borders
Is it possible to produce a histogram directly using the hist() function with the common borders removed? It can be done by plotting the histogram object using type 's'teps. my.hist <- hist(x,plot=FALSE) plot(my.hist$breaks,c(0,my.hist$counts),type='s') I would appreciate help Ross Darnell -- University of Queensland, Brisbane QLD 4067 AUSTRALIA Email: <r.darnell at
2005 Apr 13
3
A suggestion for predict function(s)
Maybe a useful addition to the predict functions would be to return the values of the predictor variables. It just (unless there are problems) requires an extra line. I have inserted an example below. "predict.glm" <- function (object, newdata = NULL, type = c("link", "response", "terms"), se.fit = FALSE,
2002 Dec 05
2
Problems with segments and multiple graphs
I would like to create a page of two graphs (2 rows by 1 col) and then draw vertical lines (segments?) on both graphs from the minimum values to the corresponding maximum value. So I have tried # > y <- rnorm(3000) > par(mfrow=c(2,1)) > plot(y,type="l") > plot(cumsum(y),type="l") > segments(1000,min(cumsum(y)),1000,max(cumsum(y))) > par(mfg=c(1,1)) >
2002 Feb 15
2
Reordering factor levels
I would like to define the order of the levels of a factor. The relevel function would work but since I have 20 levels I would prefer to declare the order explicitly. Using a smaller example levels(oldfactor) "b1" "b2" "r1" "r2" nufactor <- order(oldfactor,order=c("b1","r1","b2","r2")) # my fabricated function
2007 May 01
0
[Fwd: Re: [R-downunder] Beware unclass(factor)] (PR#9641)
It really is unclear what is claimed to be a bug here. But see https://stat.ethz.ch/pipermail/r-devel/2007-May/045592.html for why the bug is not in R: your old and new data do not match. Your fit is to a category. [The problem with the web interface to R-bugs was reported last week: it is being worked on.] On Mon, 30 Apr 2007, r.darnell at uq.edu.au wrote: > This is a multi-part
2005 Apr 14
1
predict.glm(..., type="response") loses names (was RE: [R] A sugg estion for predict function(s))
> From: Ross Darnell > > Liaw, Andy wrote: > >>From: Liaw, Andy > >> > >> > >>>From: Ross Darnell > >>> > >>>A good point but what is the value of storing a large set of > >>>predicted > >>>values when the values of the explanatory variables are lost > >>>(predicted >
2005 Sep 13
2
Translating lme model call to lme4
I would appreciate help translating the following lme model to an lmer function. lme(lognrms ~ Group*Rotation*muscle*side*support*arms, random=~1|Subject/Stratum2/rep, data=Data) Many thanks Ross Darnell r.darnell at uq.edu.au
2005 Aug 15
2
stepAIC invalid scope argument
I am trying to replicate the first example from stepAIC from the MASS package with my own dataset but am running into error. If someone can point where I have gone wrong, I would appreciate it very much. Here is an example : set.seed(1) df <- data.frame( x1=rnorm(1000), x2=rnorm(1000), x3=rnorm(1000) ) df$y <- 0.5*df$x1 + rnorm(1000, mean=8, sd=0.5) # pairs(df); head(df) lo <-
2012 Sep 18
1
Lowest AIC after stepAIC can be lowered by manual reduction of variables
Hello I am not really a statistic person, so it's possible i did something completely wrong... if this is the case: sorry... I try to get the best GLM model (with the lowest AIC) for my dataset. Therefore I run a stepAIC (in the "MASS" package) for my GLM allowing only two-variable-interactions. For the output (summary) I got a model with 7 (of 8) variabels and 5 interactions and
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
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
2008 Dec 09
0
keep function in stepAIC
Dear: Does anyone use keep function in stepAIC command? If so, could you give an example? I try to use this function to choose some variables in all of possible models. Many Thanks! Xin [[alternative HTML version deleted]]
2012 Nov 02
0
stepAIC and AIC question
I have a question about stepAIC and extractAIC and why they can produce different answers. Here's a stepAIC result (slightly edited - I removed the warning about noninteger #successes): stepAIC(glm(formula = (Morbid_70_79/Present_70_79) ~ 1 + Cohort + Cohort2, family = binomial, data = ghs_70_79, subset = ghs_70_full),direction = c("backward")) Start: AIC=3151.41
2003 Jul 30
0
stepAIC()
Hi, I am experiencing a baffling behaviour of stepAIC(), and I hope to get any advice/help on this. Greatly appreciate any kind advice given. I am using stepAIC() to, say, select a model via stepwise selection method. R Version : 1.7.1 Windows ME Many thanks! ***Issue : When stepAIC() is placed within a function, it seems that stepAIC() cannot detect the data matrix, and the program is
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
1999 May 19
1
shell command
Using R (version 0.63.3) for MS windows, I try the following command > shell(paste("cd ",getenv("RHOME"),sep="")) which replies with an error message Too many parameters - FILES\RW0633 which appears to suggest that the space if the path name is causing difficulties to the cd command. getenv returns > getenv("RHOME") RHOME
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 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