Description Usage Arguments Details Value See Also Examples
A function to assign an interpolation type to a variable in a data frame.
1 | assigninterp(df, vars, value)
|
df |
a data frame |
vars |
character vector giving name of variables |
value |
an interpolation type, posssible options are given by typing interptypes(), see ?interptypes |
The three types of interpolation method employed in the package lgcp are:
'Majority' The interpolated value corresponds to the value of the covariate occupying the largest area of the computational cell.
'ArealWeightedMean' The interpolated value corresponds to the mean of all covariate values contributing to the computational cell weighted by their respective areas.
'ArealWeightedSum' The interpolated value is the sum of all contributing covariates weighed by the proportion of area with respect to the covariate polygons. For example, suppose region A has the same area as a computational grid cell and has 500 inhabitants. If that region occupies half of a computational grid cell, then this interpolation type assigns 250 inhabitants from A to the computational grid cell.
assigns an interpolation type to a variable
minimum.contrast, minimum.contrast.spatiotemporal, chooseCellwidth, getpolyol, guessinterp, getZmat, addTemporalCovariates, lgcpPrior, lgcpInits, CovFunction lgcpPredictSpatialPlusPars, lgcpPredictAggregateSpatialPlusPars, lgcpPredictSpatioTemporalPlusPars, lgcpPredictMultitypeSpatialPlusPars
1 2 | ## Not run: spdf a SpatialPolygonsDataFrame
## Not run: spdf@data <- assigninterp(df=spdf@data,vars="pop",value="ArealWeightedSum")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.