genBinomialDV: Generate a binomial dependent variable

Description Usage Arguments Details Value Note Author(s)

View source: R/generators.R

Description

Allow the user to specify a formula for generating a binomial dependent variable

Usage

1
2
genBinomialDV(df, form, errors, intercept, type = c("binary", "response"),
  na.rm = FALSE)

Arguments

df

dataframe to generate the dependent variable from

form

A named list containing the variables in df to be used to calculate the binomial probability, and coefficients of those variables

errors

The way the error structure of the DGP formula should be established

intercept

An adjustment to the base probability

type

Indicate whether the binary response is desired or the probability

na.rm

a logical indicating whether to fit the distribution excluding missing values or to fail on missing values

Details

Coefficients needs to be long enough to incorporate the factor levels

Value

A binomial vector by a formula generated out of the elements of form

Note

Yadda yadda yadda

Currently it can be easy for the user to build a formula that results in all 0 or 1 results. Use intercept to adjust accordingly. Additionally, coefficient scales don't make sense at the moment. Still need to add the ability to have confounders in place.

Author(s)

Jared E. Knowles


jknowles/datasynthR documentation built on May 19, 2019, 11:42 a.m.