data.frame or data.table with a
binary outcome, and a logistic model to describe it.genLogiDf(b = 2L, f = 2L, c = 1L, n = 20L, nlf = 3L,
pb = 0.5, rc = 0.8, py = 0.5, asFactor = TRUE,
model = TRUE, timelim = 5, speedglm = FALSE)
genLogiDt(b = 2L, f = 2L, c = 1L, n = 20L, nlf = 3L,
pb = 0.5, rc = 0.8, py = 0.5, asFactor = TRUE,
model = TRUE, timelim = 5, speedglm = FALSE)pb=0.3, $30%$ will be $1$s, $70%$
will be $0$src=0.8 and
n=100, it will be in the range 1-80ry=0.5, 50% will be $1$s, $50%$ will be
$0$sasFactor=TRUE (the default),
predictors given as factors will be converted to
factors in the data frame before the model is fitmodel=TRUE will also return a
model fitted with stats::glm or
speedglm::speedglmtimelim
secs. This is present to prevent duplication of rows.speedglm=TRUE, return a model
fitted with speedglm instead of glmmodel=TRUE: a list with the following values:data.frame (for
genLogiDf) or data.table (for
genLogiDt).
Predictors are labelled $x1,
x2, ..., xn$.
Outcome is $y$.
Rows represent
to $n$ observationsstats::glm or speedglm::speedglmmodel=FALSE a data.frame or
data.table as above.set.seed(1)
genLogiDf()
genLogiDt(b=0, c=2, n=100, rc=0.7, model=FALSE)Run the code above in your browser using DataLab