data(blackcap)
fitobject <- corrHLfit(migStatus ~ 1 + Matern(1|latitude+longitude),data=blackcap,
ranFix=list(nu=4,rho=0.4,phi=0.05))
predict(fitobject)
## same result using precomputed 'coeffs':
coeffs <- with(fitobject$hlfit,solve(t(attr(predictor,"LMatrix")),v_h))
predict(fitobject,blackcap,coeffs=coeffs)
## Effects of numerically singular correlation matrix C:
fitobject <- corrHLfit(migStatus ~ 1 + Matern(1|latitude+longitude),data=blackcap,
ranFix=list(nu=10,rho=0.001)) ## numerically singular C
predict(fitobject) ## predicted mu computed as X beta + L v
predict(fitobject,newX=blackcap) ## predicted mu computed as X beta + C.solve(t(L),v)
Run the code above in your browser using DataLab