glm.fi: Calculate a fragility index for the coefficient tests in a...

Description Usage Arguments Value Examples

View source: R/front.R

Description

This is a function which outputs a GLM coefficient table with an extra column which shows the fragility index corresponding to each p-value. Please note that the outcome modifications in the gaussian case are determined to be symmetric around the observation with radius max.step, which is distinct from the sufficiently likely approach considered throughout the package.

Usage

1
2
3
4
5
6
7
8
9
glm.fi(
  formula,
  family,
  data,
  max.step = 1,
  alpha = 0.05,
  cl = NULL,
  verbose = FALSE
)

Arguments

formula

a formula, see the documention of 'glm' for more details

family

a description of the error distribution, see the documention of 'glm' for more details. Currently only gaussian() and binomial() are supported.

data

a data frame with measurements on the columns and cases on the rows

max.step

an atomic vector for the max step of each response, for when the response type is restricted

alpha

a number for the size of test

cl

a cluster from the parallel package, used in greedy.fi

verbose

a logical value for whether to print status updates while running

Value

the coefficient table from 'glm' with an extra column containing the fragility index of each coefficient

Examples

1
2
3
data(PimaIndiansDiabetes2, package = "mlbench")
primdat <- PimaIndiansDiabetes2[complete.cases(PimaIndiansDiabetes2), ][1:100, ]
glm.fi(diabetes ~ ., binomial(), primdat, verbose = FALSE)

brb225/FragilityTools documentation built on Jan. 21, 2022, 1:26 a.m.