library(MASS)
(house.mblogit <- mblogit(Sat ~ Infl + Type + Cont,
data = housing,
weights=Freq,
from.table=TRUE))
sm <- simulate(house.mblogit,nsim=7)
housing.long <- housing[rep(seq.int(nrow(housing)),housing$Freq),]
(housel.mblogit <- mblogit(Sat ~ Infl + Type + Cont,
data=housing.long))
sml <- simulate(housel.mblogit,nsim=7)
housing.table <- xtabs(Freq~.,data=housing)
housing.mat <- memisc::to.data.frame(housing.table)
head(housing.mat)
(housem.mblogit <- mblogit(cbind(Low,Medium,High) ~
Infl + Type + Cont,
data=housing.mat))
smm <- simulate(housem.mblogit,nsim=7)
str(sm)
str(sml)
str(smm)
head(smm[[1]])
Run the code above in your browser using DataLab