predicted_draws_inla: Get predictors from samples obtained with...

Description Usage Arguments Details Value See Also

View source: R/predict_posterior.R

Description

Get predictors from samples obtained with INLA::inla.posterior.sample.

Usage

1
predicted_draws_inla(.result, new_pos = integer(), n = 1L, sel = NULL)

Arguments

.result

inla object.

new_pos

Integer of positions of newdata.

n

Sample size.

sel

List used for selection by INLA::inla.posterior.sample(selection = sel).

Details

Extract posterior predictors (as opposed to the ones from marginals) from an inla object, add variability to them using the standard deviation shown in each sample INLA::inla.posterior.sample of size n and output these randomized predictors as posterior::draws_vars objects.

When creating the input inla object, use eflINLA::augment_inla to ensure the data is formatted the right way and inla arguments are properly set.

Value

draws_rvars object.

See Also

INLA::inla.posterior.sample eflINLA::augment_inla


FrankLef/eflINLA documentation built on Dec. 17, 2021, 8:30 p.m.