similar to: stepAIC/lme (1.6.2)

Displaying 20 results from an estimated 1000 matches similar to: "stepAIC/lme (1.6.2)"

2006 May 15
1
anova statistics in lmer
Dear list members, I am new to R and to the R-help list. I am trying to perform a mixed-model analysis using the lmer() function. I have a problem with the output anova table when using the anova() function on the lmer output object: I only get the numerator d.f., the sum of squares and the mean squares, but not the denominator d.f., F statistics and P values. Below is a sample output, following
2003 Apr 18
1
MCMCpack gelman.plot and gelman.diag
Hi, A question. When I run gelman.diag and gelman.plot with mcmc lists obtained from MCMCregress, the results are following. > post.R <- MCMCregress(Size~Age+Status, data = data, burnin = 5000, mcmc = 100000, + thin = 10, verbose = FALSE, beta.start = NA, sigma2.start = NA, + b0 = 0, B0 = 0, nu = 0.001, delta = 0.001) > post1.R <- MCMCregress(Size~Age+Status, data
2012 Jul 20
1
Extracting standard errors for adjusted fixed effect sizes in lmer
Dear R help list, I have done a lot of searching but have not been able to find an answer to my problem. I apologize in advance if this has been asked before. I am applying a mixed model to my data using lmer. I will use sample data to illustrate my question: >library(lme4) >library(arm) >data("HR", package = "SASmixed") > str(HR) 'data.frame': 120 obs.
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
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
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 Apr 28
2
stepAIC/lme problem (1.7.0 only)
I can use stepAIC on an lme object in 1.6.2, but I get the following error if I try to do the same in 1.7.0: Error in lme(fixed = resp ~ cov1 + cov2, data = a, random = structure(list( : unused argument(s) (formula ...) Does anybody know why? Here's an example: library(nlme) library(MASS) a <- data.frame( resp=rnorm(250), cov1=rnorm(250), cov2=rnorm(250),
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
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
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
2009 Feb 18
1
using stepAIC with negative binomial regression - error message help
Dear List, I am having problems running stepAIC with a negative binomial regression model.  I am working with data on manta ray abundance, using 20 predictor variables.  Predictors include variables for location (site), time (year, cos and sin of calendar day, length of day, percent lunar illumination), oceanography (sea surface temp mean and std, sea surface height mean and std), weather (cos
2003 Jun 16
1
stop criterion for stepAIC
Hello, I am using the function stepAIC (library MASS) to run a backward elimination on my linear regression. The new model stepAIC calculates contains coefficients that have a Pr(>|t|) value below 0.1, but I'd like to have only coefficients with 0.001 or below. How can I change the stop criterion for stepAIC, so that it is more strict? There is a parameter "steps", but it is
2007 Jun 27
1
stepAIC on lm() where response is a matrix..
dear R users, I have fit the lm() on a mtrix of responses. i.e M1 = lm(cbind(R1,R2)~ X+Y+0). When i use summary(M1), it shows details for R1 and R2 separately. Now i want to use stepAIC on these models. But when i use stepAIC(M1) an error message comes saying that dropterm.mlm is not implemented. What is the way out to use stepAIC in such cases. regards,
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 Jan 28
1
StepAIC with coxph
Hi, i'm trying to apply StepAIC with coxph...but i have the same error: stepAIC(fitBMT) Start: AIC=327.77 Surv(TEMPO,morto==1) ˜ VOD + SESSO + ETA + ........ Error in dropterm.default(fit,scope$drop, scale=scale,trace=max(0, : number of rows in use has changed: remove missing values? anybody know this error?? Thanks. Michele [[alternative HTML version deleted]]
2006 Dec 04
1
stepAIC for lmer
Dear All, I am trying to use stepAIC for an lmer object but it doesn't work. Here is an example: x1 <- gl(4,100) x2 <- gl(2,200) time <- rep(1:4,100) ID <- rep(1:100, each=4) Y <- runif(400) <=.5 levels(Y) <- c(1,0) dfr <- as.data.frame(cbind(ID,Y,time,x1,x2)) fm0.lmer <- lmer(Y ~ time+x1+x2 + (1|ID), data = dfr, family = binomial)
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 <-
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.
2017 Jun 06
1
glm and stepAIC selects too many effects
This is a question at the border between stats and r. When I do a glm with many potential effects, and select a model using stepAIC, many independent variables are selected even if there are no relationship between dependent variable and the effects (all are random numbers). Do someone has a solution to prevent this effect ? Is it related to Bonferoni correction ? Is there is a ratio of
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 <-