Predict function of ngme2 predict using ngme after estimation

# S3 method for ngme
predict(
  object,
  map,
  data = NULL,
  type = "lp",
  group = NULL,
  estimator = c("mean", "sd", "5quantile", "95quantile", "median", "mode"),
  sampling_size = 100,
  burnin_size = 100,
  q = NULL,
  seed = Sys.time(),
  ...
)

Arguments

object

a ngme object

map

a named list (or dataframe) of the locations to make the prediction

data

a data.frame or matrix of covariates (used for fixed effects) names(loc) corresponding to the name each latent model vector or matrix (n * 2) for spatial coords

type

what type of prediction, c("fe", "lp", <model_name>) "fe" is fixed effect prediction <model_name> is prediction of a specific model "lp" is linear predictor (including fixed effect and all sub-models)

group

which filed to predict (used for bivariate model, should be of same length as map)

estimator

what type of estimator, c("mean", "median", "mode", "quantile")

sampling_size

size of posterior sampling

burnin_size

size of posterior burnin

q

quantile if using "quantile"

seed

random seed

...

extra argument from 0 to 1 if using "quantile"

Value

a list of outputs contains estimation of operator paramters, noise parameters