gfilogisreg: Generalized fiducial inference for logistic regression

Description Usage Arguments Value Examples

View source: R/gfilogisreg.R

Description

Simulates the fiducial distribution of a logistic regression model.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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

1
2
3
4
5
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())

gfilogisreg documentation built on Dec. 21, 2021, 5:06 p.m.