[R-sig-ME] Some help needed on testing ICC and obtaining intervals
p.moorer at med.umcg.nl
p.moorer at med.umcg.nl
Wed Feb 9 17:24:19 CET 2011
I am analysing a yes/no item (klacht = "did you have a complaint") for several organisations (org) and some covariates (alggzh = general health, geslacht = sexe and leeftijd = age). I know using them as covariates may not be the most appropriate thing to do, but I am required to do it like this. The analyses run inside SPSS 18 without any problems at all, but I seem to get one strange result and I do not get some of the output I want. (See "syntax" below).
The strange result has to do with Model2.GLM (GLM no multilevel model). The AIC and -2* LogLik for this model are lower then for the Null.Model. For Model2.GLM the are 5229.6 and 5165.6 and for the Null.Model they are 5238,426 and 5234,426. Maybe I am comparing different things (Null.Model is fitted by Laplace approximation). If so, what should Model2.GLM be or how should I change the "syntax" for the Null.Model? I need this to see if the ICC is significant, but with a negative ChiSq this is weird.
The second point is that I get a very nice graph from "dotplot(ranef(Model1.CaseMix, postVar = TRUE)..", but I would like to have the figures from which this graph is produced. I had added the last two lines (VC <- VarCorr(Model1.CaseMix),
print(VC)), but this does not seem to do it. Can someone tell me what lines I should use?
ARGO University of Groningen
BEGIN PROGRAM R.
casedata <- spssdata.GetDataFromSPSS(variables =c("org, klacht, alggzh, GESLACHT, leeftijd, lft_m, gsl_m, gzh_m"))
org <- factor(casedata$org)
GESLACHT <-factor (casedata$GESLACHT)
Model2.GLM <- glm( klacht ~as.factor(org), casedata, family = binomial)
print( "deel 1: leeg random effects model via LME4-package" )
Null.Model <- glmer(klacht ~ 1 + (1 | org), family = binomial, data = casedata, REML = FALSE )
print( "deel 1: case mix adjusted random effects model via LME4-package" )
Model1.CaseMix <- glmer(klacht ~ lft_m + gsl_m + gzh_m + (1 | org), family = binomial, data = casedata, REML = FALSE )
DiffAno.LM.Mult <- anova(Model1.CaseMix, Null.Model)
title="variantie analyse verschil likelihoodratio Random Model Case Mix, Random Model - 0, geen Linear Model (ML)",
dotplot(ranef(Model1.CaseMix, postVar = TRUE ), main = "schatting random effects coefficient \nen 95% interval bij case mix correctie")
VC <- VarCorr(Model1.CaseMix)
END PROGRAM .
More information about the R-sig-mixed-models