Skip to contents

Calculate variable importance in INLA via simulation

Usage

calc_inla_vi(
  cv_set,
  y_var,
  pred_vars,
  reff_var = NULL,
  id_vars,
  hyper_priors = list(prec.unstruct = c(1, 5e-04), prec.spatial = c(1, 5e-04),
    prec.timerw1 = c(1, 0.01)),
  W_orgUnit,
  seed = 8675309,
  nsims = 1
)

Arguments

cv_set

list object containing analysis and assessment data.frames

y_var

string name of column of observed values

pred_vars

vector string of predictor variables to use in model

reff_var

string or formula for random effects

id_vars

names of columns used as keys/ids in data.frames

hyper_priors

priors for spatial and temporal random effects

W_orgUnit

graph of orgUnit to use in spatial structure. If NULL (default), will not fit a spatial structure.

seed

a seed to use for reproducability. Default = 8675309

nsims

number of simulations to run. Default = 1

Value

dataframe of variable importance scores