# Non-temporal models:
data("grapes", package = "sae")
data("grapesprox", package = "sae")
fitRFH <- rfh(
grapehect ~ area + workdays - 1,
data = grapes,
samplingVar = "var"
)
fitRFH
summary(fitRFH)
plot(fitRFH)
plot(predict(fitRFH))
plot(mse(fitRFH))
## Not run:
# # And the same including a spatial structure:
# fitRSFH <- rfh(
# grapehect ~ area + workdays - 1,
# data = grapes,
# samplingVar = "var",
# corSAR1(as.matrix(grapesprox))
# )
#
# # Use the same methods, e.g. plot, for all these implementations:
# data("spacetime", package = "sae")
# data("spacetimeprox", package = "sae")
# nTime <- length(unique(spacetime$Time))
#
# fitRTFH <- rfh(
# Y ~ X1 + X2,
# spacetime,
# "Var",
# corAR1(nTime = nTime)
# )
#
# fitRSTFH <- rfh(
# Y ~ X1 + X2,
# spacetime,
# "Var",
# corSAR1AR1(W = as.matrix(spacetimeprox), nTime = nTime)
# )
# ## End(Not run)
Run the code above in your browser using DataLab