Learn R Programming

mcemGLM (version 1.1.3)

exdata: Example data

Description

Simulated binary response dataset to use in examples.

Usage

data("exdata")

Arguments

Format

A data frame with 60 observations on the following 4 variables.

obs

a numeric binary vector

obs2

a numeric count vector

x

a numeric vector

z1

a factor with levels 1, and 2

z2

a factor with levels 1, 2, and 3

The observations were generated independently with the code shown in the examples section.

Examples

Run this code
set.seed(123)
obs <- c(sample(0:1, 30, TRUE, prob = c(0.5, 0.5)), sample(0:1, 30, TRUE, prob = c(0.3, 0.7)))
obs2 <- c(rpois(30, 5), rpois(30, 10))

Run the code above in your browser using DataLab