filinreg: Fiducial sampler for linear regression model

Description Usage Arguments Value Examples

View source: R/filinreg.R

Description

Weighted samples of the fiducial distribution of the parameters of a linear regression model with normal, Student, Cauchy, or logistic error terms.

Usage

1
2
3
4
5
6
7
8
filinreg(
  formula,
  data = NULL,
  distr = "student",
  df = Inf,
  L = 10L,
  lucky = TRUE
)

Arguments

formula

two-sided formula defining the model

data

dataframe containing the data

distr

the distribution of the error terms, "normal", "student", "cauchy", or "logistic"

df

degrees of freedom of the Student distribution if distr = "student"

L

number of subdivisions of each axis of the hypercube (0,1)^(p+1)

lucky

logical, whether to perform the matrix inversions in the algorithm without checking invertibility; it is possible that some of these matrices are not invertible, if you are unlucky

Value

A filinreg object, list with the fiducial samples and the weights.

Examples

1
2
3
4
5
set.seed(666)
x <- c(1, 2, 3, 4)
y <- x + 3 * rcauchy(4L)
fi <- filinreg(y ~ x, distr = "cauchy", L = 30L)
fiSummary(fi)

stla/filinreg documentation built on Dec. 31, 2020, 7:34 a.m.