similar to: Using Conditional AIC with lmer

Displaying 20 results from an estimated 3000 matches similar to: "Using Conditional AIC with lmer"

2012 Oct 13
2
Function hatTrace in package lme4
Dear all, For a project I need to calculate the conditional AIC of a mixed effects model. Luckily, I found a reference in the R help forum for a function to be used: CAIC <- function(model) { sigma <- attr(VarCorr(model), 'sc') observed <- attr(model, 'y') predicted <- fitted(model) cond.loglik <- sum(dnorm(observed,
2005 Nov 24
1
AIC in lmer when using PQL
I am analysing binomial data using a generalised mixed effects model. I understand that if I use glmmPQL it is not appropriate to compare AIC values to obtain a minimum adequate model. I am assuming that this means it is also inappropriate to use AIC values from lmer since, when analysing binomial data, lmer also uses PQL methods. However, I wasn't sure so please could somebody clarify
2005 Jun 03
2
using so-library involving Taucs
Dear R developers, The trace of the hat matrix H~(n,n) is computed as follows: tr(H) = tr(BS^-1B') = tr(S^-1B'B) := tr(X) = sum(diag(X)) with B~(n,p), S~(p,p). Since p is of the order 10^3 but S is sparse I would like to employ Taucs linear solver ( http://www.tau.ac.il/~stoledo/taucs/ ) on SX = B'B. (Further improvement by implying a looping over i=1,...,p, calling
2011 Jul 25
1
Installing CAIC
Hi, I'm trying to install CAIC directly into the newest version of R using the code on the R-Forge CAIC website and I get an error message: install.packages("CAIC", repos="http://R-Forge.R-project.org") Warning message: In getDependencies(pkgs, dependencies, available, lib) : package ?CAIC? is not available (for R version 2.13.1) This has worked when I've tried in
2005 Oct 07
2
AIC in lmer
Hello all, Is AIC calculated incorrectly in lmer? It appears as though it uses AIC = -2*logLik - 2*#parms, instead of -2*LogLik + 2*#parms? Below is output from one of many models I have tried: Generalized linear mixed model fit using PQL Formula: cswa ~ pcov.ess1k + (1 | year) Data: ptct50.5 Family: poisson(log link) AIC BIC logLik deviance 224.8466 219.19 -114.4233 228.8466
2012 Jul 06
1
Definition of AIC (Akaike information criterion) for normal error models
Dear R users (r-help@r-project.org), The definition of AIC (Akaike information criterion) for normal error models has just been changed. Please refer to the paper below on this matter. Eq.(22) is the new definition. The essential part is RSS(n+q+1)/(n-q-3); it is close to GCV. The paper is temporarily available at the "Papers In Press" place. Kunio Takezawa(2012): A Revision of
2004 Nov 08
1
coxph models with frailty
Dear R users: I'm generating the following survival data: set.seed(123) n=200 #sample size x=rbinom(n,size=1,prob=.5) #binomial treatment v=rgamma(n,shape=1,scale=1) #gamma frailty w=rweibull(n,shape=1,scale=1) #Weibull deviates b=-log(2) #treatment's slope t=exp( -x*b -log(v) + log(w) ) #failure times c=rep(1,n) #uncensored indicator id=seq(1:n) #individual frailty indicator
2008 Mar 11
1
Problem comparing Akaike's AIC - nlme package
Hello, I am comparing models made with nlme functions and non-nlme functions, based on Akaike's AIC. The AIC values I get for exactly the same model formulation --for example a linear model with no random effects fit with gls and lm, respectively-- do not fit, although the values of the four model parameters are exactly the same. For example: m1 <- gls(height ~ age, data = Loblolly) m2
2009 Apr 15
2
AICs from lmer different with summary and anova
Dear R Helpers, I have noticed that when I use lmer to analyse data, the summary function gives different values for the AIC, BIC and log-likelihood compared with the anova function. Here is a sample program #make some data set.seed(1); datx=data.frame(array(runif(720),c(240,3),dimnames=list(NULL,c('x1','x2','y' )))) id=rep(1:120,2); datx=cbind(id,datx) #give x1 a
2008 Feb 26
2
AIC and anova, lme
Dear listers, Here we have a strange result we can hardly cope with. We want to compare a null mixed model with a mixed model with one independent variable. > lmmedt1<-lme(mediane~1, random=~1|site, na.action=na.omit, data=bdd2) > lmmedt9<-lme(mediane~log(0.0001+transat), random=~1|site, na.action=na.omit, data=bdd2) Using the Akaike Criterion and selMod of the package pgirmess
2004 Apr 08
1
Evaluating AIC
R Users, I was just wondering if anyone has written a program (or if there is a package) out there that calculates the different derivations of AIC (e.g. AIC, AICc, QAIC, etc.) along with AIC differences (delta's), model likelihoods, Akaike weights and evidence ratio's (from Burnham and Anderson 2002). Just in a "for instance" if someone had the -2LL, sample sizes,
2011 Apr 04
0
AIC for robust regression
I am interested in comparing the fit of robust (i.e., S and MM) and non-robust (i.e., OLS) estimators when applied to a particular data set. The paper entitled "A comparison of robust versions of the AIC based on M, S and MM-estimators" (available at: http://ideas.repec.org/p/ner/leuven/urnhdl123456789-274771.html) presents formulas for robust Akaike information criteria (AIC) for the M,
2009 Feb 24
1
Box.test reference correction (PR#13554)
Full_Name: Peter Solymos Version: 2.8.1 OS: Windows Submission from: (NULL) (129.128.141.92) The help page of the Box.test function (stats) states that the Ljung-Box test was published in: Ljung, G. M. and Box, G. E. P. (1978), On a measure of lack of fit in time series models. Biometrika 65, 553--564. The page numbers are incorrect. The correct citation should be as follows: Ljung, G. M.
2012 Nov 22
1
SEM raw moment matrix
Hello, I estimated a model using SEM package in R, which was fit to a raw moment matrix, and includes an intercept term. The only goodness of fit statistics that are output are Model Chisquare, AIC, AICc, BIC, CAIC, and normalized residuals. How can I get the other goodness of fit statistics, like adjusted goodness of fit, RMSEA, and R-squared? And how can I get the final value of the
2010 Sep 15
1
Difficulty creating Julian day in data frame
Hi, I'm attempting to add a "Julian Day" column to a data frame. Here is my code and the resulting data frame: vic.data <- read.table("C:/VIC/data/vic.data.csv", header=F) names(vic.data) <- c("year", "month", "day", "precip", "evap", "runoff", "baseflow", "Tsup",
2010 Feb 12
1
all possible subsets, with AIC
Hello, I have a question about doing ALL possible subsets regression with a general linear model. My goal is to produce cumulative Akaike weights for each of 7 predictor variables-to obtain this I need R to: 1. Show me ALL possible subsets, not just the best possible subsets 2. Give me an AIC value for each model (instead of a BIC value). I have tried to do this in library(RcmdrPlugin.HH),
2011 Jun 08
1
using stimulate(model) for parametric bootstrapping in lmer repeatabilities
Hi all, I am currently doing a consistency analysis using an lmer model and trying to use parametric bootstrapping for the confidence intervals. My model is like this: model<-lmer(y~A+B+(1|C/D)+(1|E),binomial) where E is the individual level for consistency analysis, A-D are other fixed and random effects that I have to control for. Following Nakagawa and Scheilzeth I can work out the
2013 May 21
1
Calculating AIC for the whole model in VAR
Hello! I am using package "VAR". I've fitted my model: mymodel<-VAR(mydata,myp,type="const") I can extract the Log Liklihood for THE WHOLE MODEL: logLik(mymodel) How could I calculate (other than manually) the corresponding Akaike Information Criterion (AIC)? I tried AIC - but it does not take mymodel: AIC(mymodel) # numeric(0) Thank you! -- Dimitri Liakhovitski
2008 Feb 05
1
Extracting level-1 variance from lmer()
All, How does one extract the level-1 variance from a model fit via lmer()? In the code below the level-2 variance component may be obtained via subscripting, but what about the level-1 variance, viz., the 3.215072 term? (actually this term squared) Didn't see anything in the archives on this. Cheers, David > fm <- lmer( dv ~ time.num*drug + (1 | Patient.new), data=dat.new )
2011 Mar 25
1
spatial stats - geoR - variogram - standard deviation
Hello, I am attempting to get the standard deviation in multiple distance bins in my spatial data. It appears as though the 'variog' command in the geoR package will do the trick, as one of the outputs from 'variog' is 'variog$sd', which, according to the manual, is the "standard deviation of the values in each bin". However, when I run this command, the