search for: dredge

Displaying 20 results from an estimated 99 matches for "dredge".

2013 Nov 07
2
Error running MuMIn dredge function using glmer models
Dear list, I am trying to use MuMIn to compare all possible mixed models using the dredge function on binomial data but I am getting an error message that I cannot decode. This error only occurs when I use glmer. When I use an lmer analysis on a different response variable every works great. Example using a simplified glmer model global model: mod<- glmer(cbind(st$X2.REP.LIVE, st$...
2010 Aug 17
2
how to selection model by BIC
Hi All: the package "MuMIn" can be used to select the model based on AIC or AICc. The code is as follows: data(Cement) lm1 <- lm(y ~ ., data = Cement) dd <- dredge(lm1,rank="AIC") print(dd) If I want to select the model by BIC, what code do I need to use? And when to select the best model based on AIC, what the differences between the function "dredge" in package"MuMIn" and the function "stepAIC" in package "MASS&...
2013 Mar 29
2
Error message in dredge function (MuMIn package) used with binary GLM
Hi all, I'm having trouble with the model generating 'dredge' function in the MuMIn 'Multi-model Inference' package. Here's the script: globalmodel<- glm(TB~lat+protocol+tested+ streams+goats+hay+cattle+deer, family="binomial") chat<- deviance(globalmodel)/59 #There we 59 residual degrees of freedom in this global model. mod...
2024 Jul 31
1
Difference between stats.steps() and MuMIn.dredge() to select best fit model
Hello, I try to understand the different approaches how to select the best fit regression model. This is not about AIC, BIC, etc. It is about the difference between the steps() function (in stats package) and the dredge() function (in MuMIn) package. I see several examples on the internet. step() explore the model space with a step wise approach. And dredge() try out all possible combinations of the variables. But isn't that the same? I might have a mental block on this. Which model (formula) would dredge()...
2012 Jul 11
1
Package MuMIn (dredge): Error in ret[, ] <- cbind(x, se, rep(if (is.null(df)) NA_real_ else df, : number of items to replace is not a multiple of replacement length.
Hello R community, I am attempting to run multiple logistic regressions (multinomial, via package 'nnet'), with Automated Model Selection (dredge, package 'MuMIn'). The aim is to reduce the number of predictor variables by assessing relative performance of each variable, which can be done in a coarse fashion using the Automated Model Selection option in package 'MuMIn' [dredge]. The data file is large (585000 rows) and has...
2012 Jul 27
0
dredge solely offset models in MuMIn
hello everyone, I'm modelling in lmer an average chick weight defined as "Total.brood.mass ~ offset(chick.number), with three fixed and two random effect. Next, I want to use function dredge from MuMIn package for model averaging. Not sure why, but in consequence the offset variable is treated as a predictor, so I get a table that mixes models with and without that offset term (the first crosses to the right): Model selection table (Int) all.rLD bng INF all.rLD:bng all.rLD:INF bng...
2013 Apr 01
0
Error message in dredge function (MuMIn package) with binary GLM
Hi all, My replies within the forum aren't getting approved, though my emails always go through, so here is my reply to a question I previously posted (all questions and answers shown). Thanks, Cat I'm having trouble with the model generating 'dredge' function in the MuMIn 'Multi-model Inference' package. Here's the script: globalmodel<- glm(TB~lat+protocol+tested+ streams+goats+hay+cattle+deer, family="binomial") chat<- deviance(globalmodel)/59 #There we 59 residual degrees of freedom in this global model. mod...
2010 Jan 20
1
Merge and join data
...eral of the columns are in common while the others need to be summed up. The apply functions and the merge functions don't seem to be working. I've included a basic example of what I'm trying to do below. Thanks! Sean data.frame1<-as.data.frame(matrix(c('winter','dredge','515',100,150),1,5)) names(data.frame1)<-c('Season','Gear','Area','COD','POLL') data.frame2<-as.data.frame(matrix(c('winter','dredge','515',13,24,18),1,6)) names(data.frame2)<-c('Season','Gear',...
2010 Aug 17
2
AIC in MuMIn
...read.csv("c:/migration/Mig_ratio_20100817.csv",header=T, row.names=1) mig.stds <-glm(datam.std$SummerM_ratio~ datam.std$temp_max++datam.std$evi_mean+datam.std$topo_var+datam.std$topo_mean+datam.std$coast+datam.std$Iso_index_0808,data=datam.std,family=gaussian) target.model <- dredge(mig.stds, subset=datam.std$temp_ran) error in eval(expr, envir, enclos), 'temp_ran' not found Q3 showing sub-models for two assigned explanatory variables The manual only explains how to exclude two variables. Please advise how to contain submodels regarding certain two or more variab...
2009 Apr 24
2
prediction intervals (alpha and beta) for model average estimates from binomial glm and model.avg (library=dRedging)
Hi all, I was wondering if there is a function out there, or someone has written code for making confidence intervals around model averaged predictions (y~á+âx). The model average estimates are from the dRedging library? It seems a common thing but I can't seem to find one via the search engines Examples of the models are: fit1 <- glm(y~ dbh, family = binomial, data = data) fit2 <-
2011 Oct 25
1
difficulties with MuMIn model generation with coxph
Hi All, I'm having trouble with the automatized model generation (dredge) function in the MuMIn package. I'm trying to use it to automatically generate subsets of models from a global cox proportional hazards model, and rank them based on AICc. These seems like it's possible, and the Mumin documentation says that coxph is supported. However, when I run the code...
2010 Oct 12
1
delta AIC for models with 2 variables using MuMIn
...o only certain variables. Thank you. Elaine I asked a similar question and got a great help for models with only one variable as below. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In effect, you want data(Cement) lm1 <- lm(y ~ ., data = Cement) dd <- dredge(lm1, subset = X1) want <- with(dd, is.na(X) & is.na(X2) & is.na(X3) & is.na(X4)) want ## how many models selected? sum(want) ## OK selected just 1, show it dd[want, , drop = FALSE] Oh, actually, I suppose you could automate this, so it will return all models with single variable:...
2012 Jan 17
1
MuMIn package, problem using model selection table from manually created list of models
The subject says it all really. Question 1. Here is some code created to illustrate my problem, can anyone spot where I'm going wrong? Question 2. The reason I'm following a manual specification of models relates to the fact that in reality I am using mgcv::gam, and I'm not aware that dredge is able to separate individual smooth terms out of say s(a,b). Hence an additional request, if anyone has example code for using gam in a multimodel inference framework, especially with bivariate smooths, I'd be most grateful. Cheers and Thanks in Advance Mike require(MuMIn) data(Cement) # op...
2015 Nov 23
2
Model averaging en R
Hola a todos, He realizado un dredge (para obtener todos los modelos GAM posibles a parir de un full model), luego he seleccionado un confidence set (los modelos que no se diferencian en 2 en AIC) y he hecho un model averaging con ese confidence set. Ahora me gustaría aplicar ese modelo "average" ajustado sobre otro set de d...
2011 Feb 04
1
GAM quasipoisson in MuMIn
Hi, I have a GAM quasipoisson that I'd like to run through MuMIn package - dredge - gettop.models - model.avg However, I'm having no luck with script from an example in MuMIn help file. In MuMIn help they advise "include only models with smooth OR linear term (but not both) for each variable". Their example is: # Example with gam models (based on "exa...
2012 Mar 23
3
Using MuMIn - error message
...d the ones that are labels and not continuous data using the as.factor command and I ran the most complex model and ran summary() and it seemed to have worked fine. My model was: fm2test<-lmer(Feeding~MF.vs.OF+Age.class+tide.h.l+Site+HDp+(1|Brood), data=ABMtest.df) and then I wanted to use the dredge command as so: dd<-dredge(fm2test, trace=TRUE, rank="AICc", REML=FALSE) I got an error: Error in UseMethod("fixef") : no applicable method for 'fixef' applied to an object of class "mer" I have no idea how to fix this. I have looked at ?dredge but canno...
2009 Jan 23
7
Quote, dollar and pipe
Hi All, By working on our bootstrap puppet scripts (executed wih standalone puppet), I found a difference between pipe and file parsing : A simple file with a content : $ cat withdollar.pp file { "/tmp/withdoller.txt": content => ''something like echo $1'' } When puppet parses the file : $ puppet withdollar.pp notice:
2010 Jul 14
2
R's Data Dredging Philosophy for Distribution Fitting
Forum, I'm a grad student in Civil Eng, took some Stats classes that required students learn R, and I have since taken to R and use it for as much as I can. Back in my lab/office, many of my fellow grad students still use proprietary software at the behest of advisers who are familiar with the recommended software (Statistica, @Risk (Excel Add-on), etc). I have spent a lot of time learning
2012 Jun 24
1
MuMIn for GLM Negative Binomial Model
...object has no 'calls' attribute Here is the unsuccessful Negative Binomial code. > > BirdNegBin <-glm(B~Covariate1 + Covariate2 + Covariate3 + Covariate4 + Covariate5 + Covariate6 >+ Covariate7, data = SquareSumLowland,family = negative.binomial(theta = 1)) > > NegBinDredge <- dredge(BirdNegBin) > confset.d4 <- get.models(BirdNegBin, subset = delta < 4) > model.avg(confset.d4) > confset.95p <- get.models(BirdNegBin, cumsum(weight) <= .95) > avgmod.95p <- model.avg(confset.95p) Any assistance would be appreciated. -- This message (and a...
2014 Jun 26
0
AICc in MuMIn package
Hello, I am modelling in glmmADMB count data (I´m using a negative binomial distribution to avoid possitive overdispersion) with four fixed and one random effect. I´m also using MuMIn package to calculate the AICc and also to model averaging using the function dredge. What I do not understand is why dredge calculates a different value of the AICc and degrees of freedom than the function AICc (please see bellow). Also the logLik changes (as expected). > logLik (glmmadmb.Tot.Pr.nb) ---- 12 in model selection table 'log Lik.' -379.739 (df=6) > logLi...