pi_gamma: Estimate posterior simulation prediction intervals for Gamma...

Description Usage Arguments Value

View source: R/effect_plot_helpers.R

Description

Prediction intervals for a function-on-scalar Gamma regression model are estimated using the 'posterior simulation' approach for the parameter vector, e.g. outlined here: https://stat.ethz.ch/pipermail/r-help/2011-April/275632.html. This approach is more generally applicable to generalized regression models, however the implementation is currently only focused on Gamma regression.

Usage

1
pi_gamma(model, newdata, alpha, n.rep = 10000, seed = NULL)

Arguments

model

Function-on-scalar regression model fitted with pffr

newdata

The new data.frame for which the predictions are calculated

alpha

Alpha level, defaults to 0.05, i.e. 95% prediction intervals

n.rep

number of replications for the posterior simulation

seed

Optional seed for reproducibility

Value

data.frame with two columns pi_lower and pi_upper


bauer-alex/FoSIntro documentation built on Feb. 11, 2022, 8:33 a.m.