simulateLogit: A function to generate random data from a logit model.

Description Usage Arguments Value Examples

View source: R/autoGLM.R

Description

This function generates random data simulated from a logit model based on the parameters supplied.

Usage

1
simulateLogit(nobs = 2500, pars = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0))

Arguments

nobs

number of observations that the returned dataset should include. Defaults to 2500.

pars

A vector of parameters to be used in the data generating process. Regressors may have a 0 coefficient. Defaults to 0 for all variables.

Value

A simulated dataset from a logistic probability model with nobs observations, a binary response variable, and nxregs regressors ranging from 0 to 100.

Examples

1
2
3
4
logitpars <- c(-0.5, 0.4, -0.3, 0.2, -0.1, 0, 0, 0, 0, 0, 0, 0)
logit_data <- simulateLogit(nobs=2500, pars=logitpars)

random_binaryResponse_data <- simulateLogit(nobs=500)

BPJandree/AutoGLM documentation built on Nov. 6, 2018, 10:43 p.m.