gfilinreg: Fiducial sampler for linear regression model

Description Usage Arguments Value References Examples

View source: R/gfilinreg.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
 9
10
gfilinreg(
  formula,
  data = NULL,
  distr = "student",
  df = Inf,
  L = 30L,
  Kmax = 50L,
  nthreads = parallel::detectCores(),
  stopifbig = 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)

Kmax

maximal number of combinations of indices to use

nthreads

number of threads for parallel computations

stopifbig

logical, whether to stop if the algorithm requires huge matrices

Value

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

References

Jan Hannig, Randy C.S. Lai, Thomas C.M. Lee. Computational issues of generalized fiducial inference. Computational Statistics and Data Analysis 71 (2014), 849–858. <doi:10.1016/j.csda.2013.03.003>

Examples

1
2
3
4
5
set.seed(666L)
x <- c(1, 2, 3, 4)
y <- x + 3 * rcauchy(4L)
gfi <- gfilinreg(y ~ x, distr = "cauchy", L = 30L, nthreads = 2L)
gfiSummary(gfi)

gfilinreg documentation built on March 17, 2021, 1:06 a.m.