data(Loaloa)
## Variations on the model fit by Diggle et al. on a subset of these data
## With HLmethod=HL(0,1), this takes ~35s on a recent laptop
corrHLfit(cbind(npos,ntot-npos)~elev1+elev2+elev3+elev4+maxNDVI1+seNDVI
+Matern(1|longitude+latitude),HLmethod="HL(0,1)",
data=Loaloa,family=binomial(),ranFix=list(nu=0.5))
## nu=0.5 is the exponential correlation
## the following fits take ~ 1 -- 5 minutes each.
corrHLfit(cbind(npos,ntot-npos)~elev1+elev2+elev3+elev4+maxNDVI1+seNDVI
+Matern(1|longitude+latitude),
data=Loaloa,family=binomial(),ranFix=list(nu=0.5))
## Diggle and Ribeiro (2007) assumed (in this package notation) Nugget=2/7:
corrHLfit(cbind(npos,ntot-npos)~elev1+elev2+elev3+elev4+maxNDVI1+seNDVI
+Matern(1|longitude+latitude),
data=Loaloa,family=binomial(),ranFix=list(nu=0.5,Nugget=2/7))
## with nugget estimation:
corrHLfit(cbind(npos,ntot-npos)~elev1+elev2+elev3+elev4+maxNDVI1+seNDVI
+Matern(1|longitude+latitude),
data=Loaloa,family=binomial(),
init.corrHLfit=list(Nugget=0.1),ranFix=list(nu=0.5))
Run the code above in your browser using DataLab