data(retroact)
m <- mpt(mptspec(
c*r,
(1 - c)*u^2,
2*(1 - c)*u*(1 - u),
c*(1 - r) + (1 - c)*(1 - u)^2,
u,
1 - u
), retroact[retroact$lists == 1, ])
simulate(m)
## Parametric bootstrap of goodness-of-fit test
LR.stat <- replicate(200, deviance(mpt(m$spec, simulate(m))))
hist(LR.stat, border="white", freq=FALSE, breaks=20,
main="Parametric bootstrap")
curve(dchisq(x, df=1), add=TRUE)
abline(v=deviance(m), lty=2)
Run the code above in your browser using DataLab