# NOT RUN {
if (spaMM.getOption("example_maxtime")>25) {
set.seed(1L)
d <- data.frame(y = rbinom(100, 1, 0.5), time = 1:100)
(logLik(numpb <- fitme(y ~ 1 + AR1(1|time), data = d,
family = binomial(link=cauchit), method = "PQL")))
div_info(numpb) # High lambda is often part of the problem,
# here only for negative AR parameter:
fitme(y ~ 1 + AR1(1|time), data = d, family = binomial(link=cauchit),
method = "PQL", lower=list(ARphi=0))
# Less successful fix (or cover-up):
fitme(y ~ 1 + AR1(1|time), data = d, family = binomial(link=cauchit),
method = "PQL", upper=list(lambda=20))
}
# }
Run the code above in your browser using DataLab