gfilogisreg {gfilogisreg}R Documentation

Generalized fiducial inference for logistic regression

Description

Simulates the fiducial distribution of a logistic regression model.

Usage

gfilogisreg(
  formula,
  data = NULL,
  N,
  thresh = N/2,
  progress = TRUE,
  gmp = FALSE,
  ufactr = .Machine$double.eps^(-0.5),
  vfactr = .Machine$double.eps^(-0.38)
)

Arguments

formula

formula describing the model

data

dataframe containing the variables in the model

N

number of fiducial simulations

thresh

threshold criterion for the alteration; expert usage only

progress

whether to print messages showing the progress of the algorithm

gmp

whether to use exact arithmetic in the algorithm (experimental)

ufactr, vfactr

these are control parameters of an optimization performed in the algorithm; these parameters should not be changed except if you encounter some messages about convergence issues

Value

A list with two fields: Beta, the fiducial simulations of the parameters, and Weights, their weight.

Examples

y <- c(0, 0, 1, 1, 1)
x <- c(-2, -1, 0, 1, 2)
gf <- gfilogisreg(y ~ x, N = 400) # (N=400 is not serious)
gfiSummary(gf)
glm(y ~ x, family = binomial())

[Package gfilogisreg version 1.0.3 Index]