## For data without any non-sampled area
data(sp.norm) # Load dataset
data(prox.mat) # Load proximity Matrix
result <- sar.normal(y ~ x1 + x2, "vardir", prox.mat, data = sp.norm)
result$Est # Small Area mean Estimates
result$refVar # Estimated random effect variances
result$coefficient # Estimated model coefficient
# Load library 'coda' to execute the plot
# autocorr.plot(result$plot[[3]]) # Generate ACF Plot
# plot(result$plot[[3]]) # Generate Density and Trace plot
## For data with non-sampled area use sp.normNs
Run the code above in your browser using DataLab