predict.remap: Make predictions given a set of data and smooths predictions...

View source: R/remap.R

predict.remapR Documentation

Make predictions given a set of data and smooths predictions at region borders. If an observation is outside of all regions and smoothing distances, the closest region will be used to predict.

Description

Make predictions given a set of data and smooths predictions at region borders. If an observation is outside of all regions and smoothing distances, the closest region will be used to predict.

Usage

## S3 method for class 'remap'
predict(
  object,
  data,
  smooth,
  distances,
  cores = 1,
  progress = FALSE,
  se = FALSE,
  ...
)

Arguments

object

S3 object output from remap.

data

An sf dataframe with point geometry.

smooth

The distance in km within a region where a smooth transition to the next region starts. If smooth = 0, no smoothing occurs between regions unless an observation falls on the border of two or more polygons. (Can be a named vector with different values for each unique object$region_id' in ' object$region'.)

distances

An optional matrix of distances between 'data' and 'object$regions' generated by redist() function (calculated internally if not provided).

cores

Number of cores for parallel computing. 'cores' above default of 1 will require more memory.

progress

If TRUE, a text progress bar is printed to the console. (Progress bar only appears if 'cores' = 1.)

se

If TRUE, predicted values are assumed to be standard errors and an upper bound of combined model standard errors are calculated at each prediction location. Should stay FALSE unless predicted values from remap are standard error values.

...

Arguments to pass to individual model prediction functions.

Value

Predictions in the form of a numeric vector. If se is TRUE, upper bound for combined standard errors in the form of a numeric vector.

See Also

remap building a regional model.


remap documentation built on July 9, 2023, 6:44 p.m.