Learn R Programming

gfilinreg (version 2.0.1)

gfilinregPredictive: Fiducial predictive distribution

Description

Simulations of the fiducial predictive distribution.

Usage

gfilinregPredictive(fidsamples, newdata)

Arguments

fidsamples

fiducial samples, the output of gfilinreg

newdata

dataframe in which to look for variables with which to predict, or NULL if the model is intercept-only

Value

A list with two fields: FPD, a dataframe containing the simulations, and weight, their weight. This is a gfilinreg object.

Examples

Run this code
# NOT RUN {
set.seed(666L)
x <- c(1, 2, 3, 4)
y <- x + 3 * rcauchy(4L)
gf <- gfilinreg(y ~ x, distr = "cauchy", L = 30L, nthreads = 2L)
gfpred <- gfilinregPredictive(gf, data.frame(x = c(4, 5)))
gfiSummary(gfpred)
# }

Run the code above in your browser using DataLab