similar to: one more piece of info on AIC

Displaying 20 results from an estimated 40000 matches similar to: "one more piece of info on AIC"

2002 Jun 26
1
aic calculus for glm models
I am trying to know exactly the formulas used to calculate aic for glm models. In glm.fit, the calculus of aic is: aic.model <- aic(y, n,mu, weights, dev) + 2 * fit$rank where 2 * fit$rank is (may be am i wrong?) twice the numbers of parameters p and aic(y, n, mu, weights, dev) refers to the function defined in the family function (which is for Gamma family, for instance) aic
2002 Feb 27
1
Bug in glm.fit? (PR#1331)
G'day all, I had a look at the GLM code of R (1.4.1) and I believe that there are problems with the function "glm.fit" that may bite in rare circumstances. Note, I have no data set with which I ran into trouble. This report is solely based on having a look at the code. Below I append a listing of the glm.fit function as produced by my system. I have added line numbers so that I
2018 Jun 03
2
aic() component in GLM-family objects
Is it generally known/has it been previously discussed here that the $aic() component in GLM-family objects (e.g. results of binomial(), poisson(), etc.) does not as implemented actually return the AIC, but rather -2*log-likelihood + 2*(model_has_scale_parameter) ? Can anyone in this forum gauge how a documentation patch would be received? This behaviour does not seem to be documented in ?family
2007 Nov 27
1
Difference between AIC in GLM and GLS - not an R question
Hi, I have fitted a model using a glm() approach and using a gls() approach (but without correcting for spatially autocorrelated errors). I have noticed that although these models are the same (as they should be), the AIC value differs between glm() and gls(). Can anyone tell me why they differ? Thanks, Geertje ~~~~ Geertje van der Heijden PhD student Tropical Ecology School of Geography
2007 Dec 18
1
How can I extract the AIC score from a mixed model object produced using lmer?
I am running a series of candidate mixed models using lmer (package lme4) and I'd like to be able to compile a list of the AIC scores for those models so that I can quickly summarize and rank the models by AIC. When I do logistic regression, I can easily generate this kind of list by creating the model objects using glm, and doing: > md <- c("md1.lr", "md2.lr",
2004 Jun 15
1
AIC in glm.nb and glm(...family=negative.binomial(.))
Can anyone explain to me why the AIC values are so different when using glm.nb and glm with a negative.binomial family, from the MASS library? I'm using R 1.8.1 with Mac 0S 10.3.4. >library(MASS) > dfr <- data.frame(c=rnbinom(100,size=2,mu=rep(c(10,20,100,1000),rep(25,4))), + f=factor(rep(seq(1,4),rep(25,4)))) > AIC(nb1 <- glm.nb(c~f, data=dfr)) [1] 1047 >
2003 Mar 12
2
quasipoisson, glm.nb and AIC values
Dear R users, I am having problems trying to fit quasipoisson and negative binomials glm. My data set contains abundance (counts) of a species under different management regimens. First, I tried to fit a poisson glm: > summary(model.p<-glm(abund~mgmtcat,poisson)) Call: glm(formula = abund ~ mgmtcat, family = poisson) . . . (Dispersion parameter
2011 Jul 13
3
Sum weights of independent variables across models (AIC)
Hello, I'd like to sum the weights of each independent variable across linear models that have been evaluated using AIC. For example: > library(MuMIn) > data(Cement) > lm1 <- lm(y ~ ., data = Cement) > dd <- dredge(lm1, beta = TRUE, eval = TRUE, rank = "AICc") > get.models(dd, subset = delta <4) There are 5 models with a Delta AIC Score of
2010 Aug 27
1
AIC using nls function
Using the nls function I fit the following model (and some others) to my data. mod1=nls(CLr ~ A-(A-CLi)*exp(-k*d), start = list(A=60,k=0.005)) I would like to rank a set of models using AIC. I calculated AIC as AIC(mod1) However, it appears to use an incorrect number of parameters (3 instead of 2). Why is this? Additionally, if I calculate AIC using the residuals sum of squares instead of the
2012 Sep 11
1
using alternative models in glmulti
All, I am working on a multiple-regression meta-analysis and have too many alternative models to fit by hand. I am using the "metafor" package in R, which generates AIC scores among other metrics. I'm using a simple formula to define these models. For example, rma(Effect_size,variance, mods=~Myco_type + N.type +total, method="ML")->mod where Effect_size is the
2007 Jan 06
2
negative binomial family glm R and STATA
Dear Lister, I am facing a strange problem fitting a GLM of the negative binomial family. Actually, I tried to estimate theta (the scale parameter) through glm.nb from MASS and could get convergence only relaxing the convergence tolerance to 1e-3. With warning messages: glm1<-glm.nb(nbcas~.,data=zonesdb4,control=glm.control(epsilon = 1e-3)) There were 25 warnings (use warnings() to see
2011 Apr 19
1
How to Extract Information from SIMEX Output
Below is a SIMEX object that was generated with the "simex" function from the "simex" package applied to a logistic regression fit. From this mountain of information I would like to extract all of the values summarized in this line: .. ..$ variance.jackknife: num [1:5, 1:4] 1.684 1.144 0.85 0.624 0.519 ... Can someone suggest how to go about doing this? I can extract the
2011 Mar 28
1
Degrees of freedom for lm in logLik and AIC
I have a question about the computation of the degrees of freedom in a linear model: x <- runif(20); y <- runif(20) f <- lm(y ~ x) logLik(f) 'log Lik.' -1.968056 (df=3) The 3 is coming from f$rank + 1. Shouldn't it be f$rank? This affects AIC(f). Thanks Frank ----- Frank Harrell Department of Biostatistics, Vanderbilt University -- View this message in context:
2007 Feb 10
2
error using user-defined link function with mixed models (LMER)
Greetings, everyone. I've been trying to analyze bird nest survival data using generalized linear mixed models (because we documented several consecutive nesting attempts by the same individuals; i.e. repeated measures data) and have been unable to persuade the various GLMM models to work with my user-defined link function. Actually, glmmPQL seems to work, but as I want to evaluate a suite of
2005 Jun 14
1
New Family object for GLM models...
Dear R-Users, I wish to create a new family object based on the Binomial family. The only difference will be with the link function. Thus instead if using the 'logit(u)' link function, i plan to use '-log(i-u)'. So far, i have tried to write the function following that of the Binomial and Negative Binomial families. The major problem i have here is with the definition of the
2008 Sep 24
2
Error message when calculating BIC
Hi All, Could someone help me decode what this error means ? > BIC(nb.80) Error in log(attr(object, "nobs")) : Non-numeric argument to mathematical function > BTW, nb.80 is a negative binomial glm model created using the MASS library with the call at the bottom of the message In the hopes of trying to figure this out I tried the following workaround but it did not work
2018 Jun 17
1
aic() component in GLM-family objects
FWIW p. 206 of the White Book gives the following for names(binomial()): family, names, link, inverse, deriv, initialize, variance, deviance, weight. So $aic wasn't there In The Beginning. I haven't done any more archaeology to try to figure out when/by whom it was first introduced ... Section 6.3.3, on extending families, doesn't give any other relevant info. A patch for
2013 Jul 11
1
Differences between glmmPQL and lmer and AIC calculation
Dear R Community, I?m relatively new in the field of R and I hope someone of you can help me to solve my nerv-racking problem. For my Master thesis I collected some behavioral data of fish using acoustic telemetry. The aim of the study is to compare two different groups of fish (coded as 0 and 1 which should be the dependent variable) based on their swimming activity, habitat choice, etc.
2005 Jun 16
1
mu^2(1-mu)^2 variance function for GLM
Dear list, I'm trying to mimic the analysis of Wedderburn (1974) as cited by McCullagh and Nelder (1989) on p.328-332. This is the leaf-blotch on barley example, and the data is available in the `faraway' package. Wedderburn suggested using the variance function mu^2(1-mu)^2. This variance function isn't readily available in R's `quasi' family object, but it seems to me
2001 Sep 11
2
AIC
Dear R collegues, I'm trying to understand what's AIC in R (ver. 1.3.1), and I'm getting a different answer if I look at the AIC(of the fitted model) or the aic in the summary( of the fitted model). Is this correct? Can somebody explain me the difference between the two values? or Is the AIC criterion not appropiated for Poisson models? R session: > t1 <- glm(tax ~ areal,