Displaying 1 result from an estimated 1 matches for "agq7".
Did you mean:
agq
2008 Aug 19
1
R vs Stata on generalized linear mixed models: glmer and xtmelogit
...faraway); library(lme4); library(MASS)
data <- ohio
pql <- glmmPQL(resp~smoke+factor(age), random=~1|id, family=binomial,data)
summary(pql)$tTable["smoke",1:2]
lap <- glmer(resp~smoke+factor(age)+(1|id), family=binomial,data)
attributes(summary(lap))$coefs["smoke",1:2]
agq7 <- glmer(resp~smoke+factor(age)+(1|id),nAGQ=7,family=binomial,data)
write.csv(data,file="data.csv")
This is the code for Stata:
clear
insheet using data.csv
xi: xtmelogit resp smoke i.age, || id:, covariance(independent) laplace
xi: xtmelogit resp smoke i.age, || id:, covariance(in...