search for: aictab

Displaying 16 results from an estimated 16 matches for "aictab".

2010 Sep 28
1
Function works when custom defined but not when part of a package
Hi folks, I'm not sure if this is a bug or not so I thought I'd check here first. I came across it while working on an update to my package where I try to get AICtab slot from the summary of an lmer object ( summary(my_lmer)@AICtab ). The attached contains a minimal example, where the code below will work if you load the f() function by sourcing the package's R code but will throw an error ("trying to get slot "AICtab" from an object (class...
2012 Sep 13
1
AICcmodavg
...2.15.1. I need help with code that is instead being read as text. Below is a subset of code... I actually have 12 models, but I am trying to get this to work for 2 below right now. Everything 'appears' to work through the line starting with Modnames. After that the code starting with aictab and beyond is recognized as text and not code. What am I doing incorrectly with the code? buco.models<-list ( ) buco.models [[1]] <- glm(P.BUCO~faverage+W15CNT, family=binomial(logit), data=AmphAIC) buco.models [[2]] <- glm(P.BUCO~diam1+W15CNT, family=binomial(logit), data=AmphAIC) Mod...
2017 Dec 26
1
identifying convergence or non-convergence of mixed-effects regression model in lme4 from model output
....data$t.val = as.numeric(summary(lmer.mod)$coefficients[,4]) #t-values ? mod.data$p.val = as.numeric(summary(lmer.mod)$coefficients[,5]) #p-values ? #extract AIC, BIC, logLik, deviance df.resid ? mod.data$AIC = as.numeric(summary(lmer.mod)$AIC[1]) ? mod.data$BIC = as.numeric(summary(lmer.mod)$AICtab[2][1]) ? mod.data$logLik = as.numeric(summary(lmer.mod)$AICtab[3][1]) ? mod.data$deviance = as.numeric(summary(lmer.mod)$AICtab[4][1]) ? mod.data$df.resid = as.numeric(summary(lmer.mod)$AICtab[5][1]) ? #add number of datapoints ? mod.data$N = as.numeric(summary(incr.best.m)$devcomp$dims[1])...
2008 Apr 02
2
restrictions for attribute access <Watchdog: Virus checked>
...milar, but I'm unable to figure it out, maybe someone knows the trick how to do it ... I'm trying to extract some information from the summary object for a model fitted using the lmer function from the lme4 package: smry <- summary(lmer(foo ~ bar ...)) tab <- attr(smry, "AICtab") tab$AIC When I run this code as a regular R script everything works fine, tab$AIC has the desired value. But when I try to run this code from within a package I wrote, tab$AIC is NULL. I've tried adding "import(lme4)", "importClassesFrom(lme4)" and "import...
2012 Feb 13
2
R's AIC values differ from published values
...t ) Cand.models[[3]] <- lm ( y ~ x1 + x2 + x1 * x2, data = cement ) Cand.models[[4]] <- lm ( y ~ x3 + x4 + x3 * x4, data = cement ) ## vector of model names Modnames <- paste("MODEL", 1:4, sep=" ") ## AICc aictab ( cand.set = Cand.models, modnames = Modnames ) However, the AICc value reported by Anderson (2008) is 32.41. The AICc value obtained using RSS value (i.e., calculating AICc "manually" from the output of linear regression) is 32.41. Thanks for any help. David New R user, min...
2010 May 28
1
Comparing and Interpreting GAMMs
...wever this would obviously test each of the smooths aginst a horizontal line which is not what I want. Any help is greatly appreciated, thanks! Andrea Output of 1st model gamm.11: ---------------------------------------- logLik(gamm.11$mer);deviance(gamm.11$mer);attributes(summary(gamm.11$mer))$AICtab[1];gamm.11$mer@deviance["disc"] 'log Lik.' -49054.65 (df=5) ML 98109.3 AIC 98119.3 disc 97600 > summary(gamm.11$mer);summary(gamm.11$gam) Generalized linear mixed model fit by the Laplace approximation AIC BIC logLik deviance 98119 98167 -49055 98109...
2006 Jul 04
1
lmer print outs without T
Hi, I have been having a tedious issue with lmer models with lots of factors and lots of levels. In order to get the basic information at the beginning of the print out I also have to generate these enormous tables as well. Is there a method command to leave off all of the effects and correlations? Or, do I have to go to string commands?
2012 Nov 08
2
Comparing nonlinear, non-nested models
Dear R users, Could somebody please help me to find a way of comparing nonlinear, non-nested models in R, where the number of parameters is not necessarily different? Here is a sample (growth rates, y, as a function of internal substrate concentration, x): x <- c(0.52, 1.21, 1.45, 1.64, 1.89, 2.14, 2.47, 3.20, 4.47, 5.31, 6.48) y <- c(0.00, 0.35, 0.41, 0.49, 0.58, 0.61, 0.71, 0.83, 0.98,
2010 Jan 26
1
AIC for comparing GLM(M) with (GAM(M)
...ly=binomial) > gamm.0<-gamm4(dv ~ s(hours24,fx=F,k=-1,bs=“cc“),method="ML",data=sdata, family=binomial) Fit indices using the commands as shown are: > logLik(gam.0)[1];deviance(gam.0);AIC(gam.0) > logLik(gamm.0$mer);deviance(gamm.0$mer);attributes(summary(gamm. 0$mer))$AICtab[1] gam.0: logLik=1149.6, deviance=2299.3, AIC=2316.0 gamm.0: logLik=1169.0, deviance=2338.0, AIC=2342.0 The differences between the two AIC values seem to be based on two factors. First, gam uses the effective degrees of freedom > sum(gam.0$edf) [1] 8.372517 whereas gamm4 uses the value 2....
2006 Aug 21
1
Retrieving p-values and z values from lmer output
I can't find a way to retrieve z values and p-values from the output from lmer in the lme4 package. How is this done? Rick B.
2008 Dec 25
0
Class and object problem
...have to define logLik and AIC for glmmML objects logLik.glmmML <- function(x) { loglik <- (-x$deviance)/2 attr(loglik,"df") <- length(coef(x)) loglik } AIC.glmmML <- function(x) x$aic library(bbmle) ## now it works (the answers are pretty trivial ## in this made-up case AICtab(m,sort=TRUE,weights=TRUE,delta=TRUE)
2008 Jan 24
0
(lme4: lmer) mcmcsamp: Error in if (var(y) == 0)
..."summary.lmer" else "summary.mer" }, object, isG = glz, methTitle = methTitle, logLik = llik, ngrps = sapply(object at flist, function(x) length(levels(x))), sigma = .Call(mer_sigma, object, REML), coefs = coefs, vcov = vcov, REmat = REmat, AICtab = AICframe) 2: summary(emnlp.m1) 1: summary(emnlp.m1) -- David Reitter ICCS/HCRC, Informatics, University of Edinburgh http://www.david-reitter.com
2010 May 18
1
BIC() in "stats" {was [R-sig-ME] how to extract the BIC value}
...251.405 ? ? ?6.825 ? 36.84 >>>> Days ? ? ? ? ?10.467 ? ? ?1.546 ? ?6.77 >>>> >>>> Correlation of Fixed Effects: >>>> ? ? (Intr) >>>> Days -0.138 >>>> >>>>> (fm1fit <- summary(fm1)@AICtab) >>>> ? ? ?AIC ? ? ?BIC ? ?logLik deviance ?REMLdev >>>> ?1755.628 1774.786 -871.8141 1751.986 1743.628 >>>> >>>>> fm1fit$BIC >>>> [1] 1774.786 >>> >>> That's one way of doing it but i...
2008 Dec 19
4
Akaike weight in R
Odette > Wondering how can I generate "Akaike weight" with R? I know the description, > but is there any function to generate by R on the web-site or R library? > I am using GLM or GLMM (family=binomial), so would be appreciated if you > help me. You could have a look at this. http://bm2.genes.nig.ac.jp/RGM2/R_current/library/aod/man/summary.aic.html Which is in the OAD
2008 Dec 26
1
starting values update
...have to define logLik and AIC for glmmML objects logLik.glmmML <- function(x) { loglik <- (-x$deviance)/2 attr(loglik,"df") <- length(coef(x)) loglik } AIC.glmmML <- function(x) x$aic library(bbmle) ## now it works (the answers are pretty trivial ## in this made-up case AICtab(m,sort=TRUE,weights=TRUE,delta=TRUE) ------------------------------ Message: 9 Date: Thu, 25 Dec 2008 22:20:38 +0100 From: Peter Dalgaard <p.dalgaard@biostat.ku.dk> Subject: Re: [R] 4 questions regarding hypothesis testing, survey package, ts on samples, plotting To: Ben Bolker <bolke...
2012 Jan 18
4
R-Help
I am trying to create a frequency distribution and I am a bit confused. Here are the commands I have entered: > data <- read.csv(file="40609_sortedfinal.csv",head=TRUE,sep=",") > NumberOfActionsByStatus = data$STATUS > NumberOfActionsByUser = data$ETS_LOGIN > NumberOfBidOffer = data$BID_OFFER > NumberOfActionsByUser.freq = table(NumberOfActionsByUser) >