Learn R Programming

intubate (version 1.0.0)

Rchoice: Interfaces for Rchoice package for data science pipelines.

Description

Interfaces to Rchoice functions that can be used in a pipeline implemented by magrittr.

Usage

ntbt_Rchoice(data, ...)

Arguments

data
data frame, tibble, list, ...
...
Other arguments passed to the corresponding interfaced function.

Value

Object returned by interfaced function.

Details

Interfaces call their corresponding interfaced function.

Examples

Run this code
## Not run: 
# library(intubate)
# library(magrittr)
# library(Rchoice)
# 
# ## ntbt_Rchoice: Bias reduction in Binomial-response GLMs
# data("Workmroz")
# 
# ## Original function to interface
# Rchoice(lfp ~ k5 + k618 + age + wc + hc + lwg + inc,
#         data = Workmroz, family = binomial('probit'))
# ## The interface puts data as first parameter
# ntbt_Rchoice(Workmroz, lfp ~ k5 + k618 + age + wc + hc + lwg + inc,
#              family = binomial('probit'))
# 
# ## so it can be used easily in a pipeline.
# Workmroz %>%
#   ntbt_Rchoice(lfp ~ k5 + k618 + age + wc + hc + lwg + inc,
#                family = binomial('probit'))
# ## End(Not run)

Run the code above in your browser using DataLab