Learn R Programming

partialOR (version 0.9)

simData: DATA SIMULATION

Description

Simulates data to be used as an example for partialOR.

Usage

simData(n=50, m=2, rr=1.5, rseed = 123)

Arguments

n
number of independent observations
m
number of covariates
rr
common Odds Ratio
rseed
seed for the random number generator (default 123)

Value

x, y are 0/1 binary variables and z's are the covariates.

Details

The covariates are i.i.d. N(0,1) variables.

Examples

Run this code
dd <- simData(50, 2, 1.5, rseed=123)
head(dd)

Run the code above in your browser using DataLab