# \donttest{
library(terra)
set.seed(123)
sd = sim_data_fe(dataset=regsamp,N=100,TT=8,spatial = 80,
Tau = -0.2,Rho = 0.4, Beta = 2,sdDev = 2,
startingT = 10,LONGLAT = TRUE)
est_inla = inla.st(formula = Y~-1+X1,d = sd[[1]]@data,
W = sd[[2]],PHI=-0.2,RHO=0.4,
var.agg=c('Cod_Provincia','Anno'),
family='gaussian',
improve=TRUE,
normalization=FALSE,
control.family = list(hyper = list(prec=list(initial=25,fixed=TRUE))),
control.predictor = list(compute = TRUE),
control.compute = list(dic = TRUE, cpo = TRUE),
control.inla = list(print.joint.hyper = TRUE))
summary(est_inla)
# }
Run the code above in your browser using DataLab