data(electors)
summary(mclogit(
cbind(Freq,interaction(time,class))~econ.left+welfare+auth,
data=electors))
summary(mclogit(
cbind(Freq,interaction(time,class))~econ.left/class+welfare/class+auth/class,
data=electors))
if (FALSE) # This takes a bit longer.
summary(mclogit(
cbind(Freq,interaction(time,class))~econ.left/class+welfare/class+auth/class,
random=~1|party.time,
data=within(electors,party.time<-interaction(party,time))))
summary(mclogit(
cbind(Freq,interaction(time,class))~econ.left/(class*time)+welfare/class+auth/class,
random=~1|party.time,
data=within(electors,{
party.time <-interaction(party,time)
econ.left.sq <- (econ.left-mean(econ.left))^2
})))
Run the code above in your browser using DataLab