data(scotlip)
# CAR by Laplace with 'outer' estimation of rho
if (spaMM.getOption("example_maxtime")>5) {
corrHLfit(cases~I(prop.ag/10) +adjacency(1|gridcode)+offset(log(scotlip$expec)),
adjMatrix=Nmatrix,family=poisson(),data=scotlip,HLmethod="ML") ## ~ 5 s.
}
# CAR by Laplace with 'inner' estimation of rho
HLCor(cases~I(prop.ag/10) +adjacency(1|gridcode)+offset(log(scotlip$expec)),
adjMatrix=Nmatrix,family=poisson(),data=scotlip,HLmethod="ML") ## < 1 s.
Run the code above in your browser using DataLab