if (FALSE) {
## rather unconvincing example : quantitative effect is small.
# measure size of saved object:
saveSize <- function (object,...) {
tf <- tempfile(fileext = ".RData")
on.exit(unlink(tf))
save(object, file = tf,...)
file.size(tf)
}
data("Loaloa")
lfit <- fitme(cbind(npos,ntot-npos)~elev1+elev2+elev3+elev4+maxNDVI1+seNDVI
+Matern(1|longitude+latitude), method="HL(0,1)",
data=Loaloa, family=binomial(), fixed=list(nu=0.5,rho=1,lambda=0.5))
saveSize(lfit)
pfit <- predict(lfit,newdata=Loaloa,variances=list(cov=TRUE)) # increases size!
saveSize(lfit)
lfit <- stripHLfit(lfit)
saveSize(lfit)
}
Run the code above in your browser using DataLab