Skip to contents

One way to calculate the PI for an INLA model with the appropriate error is to fit a random error term to each observation. This takes the output of that to estimate PIs.

Usage

get_inla_pi(inla_marginal, quantile_levels, id_df)

Arguments

inla_marginal

output of marginals.fitted.values from INLA model for one observation

quantile_levels

quantiles that you want to estimate interval at

id_df

a one row dataframe containing the id variables and true_value for that observation