Function to fit the disaggregation model
as.disag_data(
polygon_shapefile,
shapefile_names,
covariate_rasters,
polygon_data,
covariate_data,
aggregation_pixels,
coordsForFit,
coordsForPrediction,
startendindex,
mesh = NULL
)
A list is returned of class disag_data
.
The functions summary, print and plot can be used on disag_data
.
The list of class disag_data
contains:
The SpatialPolygonDataFrame used as an input.
The RasterStack used as an input.
A data frame with columns of area_id, response and N (sample size: all NAs unless using binomial data). Each row represents a polygon.
A data frame with columns of area_id, cell_id and one for each covariate in covariate_rasters. Each row represents a pixel in a polygon.
An array with the value of the aggregation raster for each pixel in the same order as the rows of covariate_data.
A matrix with two columns of x, y coordinates of pixels within the polygons. Used to make the spatial field.
A matrix with two columns of x, y coordinates of pixels in the whole Raster. Used to make predictions.
A matrix with two columns containing the start and end index of the pixels within each polygon.
A INLA mesh to be used for the spatial field of the disaggregation model.
SpatialPolygonDataFrame containing the response data
List of 2: polygon id variable name and response variable name from polygon_shapefile
RasterStack of covariates
data.frame with two columns: polygon id and response
data.frame with cell id, polygon id and covariate columns
vector with value of aggregation raster at each pixel
coordinates of the covariate data points within the polygons in polygon_shapefile
coordinates of the covariate data points in the whole raster extent
matrix containing the start and end index for each polygon
inla.mesh object to use in the fit