Giter VIP home page Giter VIP logo

ib's Introduction

R-CMD-check Last-changedate license

Bias correction via the iterative bootstrap

This is an under-development package that proposes the iterative bootstrap algorithm of Kuk (1995) and further studied by Guerrier et al (2019) and Guerrier et al (2020).

In order to install the package

## if not installed
## install.packages("remotes")
remotes::install_github("SMAC-Group/ib")

The ib package is conceived as a wrapper: an object that needs a bias correction is supplied to the ib() function. For example, for a negative binomial regression:

library(ib)
library(MASS)
fit_nb <- glm.nb(Days ~ Sex/(Age + Eth*Lrn), data = quine)
fit_ib1 <- ib(fit_nb)
summary(fit_ib1)

## correct for overdispersion with H=100
fit_ib2 <- ib(fit_nb, control=list(H=100), extra_param = TRUE)
summary(fit_ib2)

Currently we support lm, glm, glm.nb, lmer, nls and vglm classes, as shown in the example above with the overdispersion parameter of the negative binomial regression. More details are in help(ib).

On top of simulate, we also consider cases where the response variable is generated using censoring, missing at random and outliers mechanisms (see help(ibControl) for more details). For example

## suppose values above 30 are censored
quine2 <- transform(quine, Days=pmin(Days,30))
fit_nb <- glm.nb(Days ~ Sex/(Age + Eth*Lrn), data = quine2)
fit_ib1 <- ib(fit_nb, control = list(cens=TRUE, right=30))
summary(fit_ib1)

## correct for overdispersion with H=100
fit_ib2 <- ib(fit_nb, control=list(H=100, cens=TRUE, right=30), extra_param = TRUE)
summary(fit_ib2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.