Learn R Programming

ib (version 0.2.0)

simulation: Generic for simulating from the object

Description

Method for simulating responses from an object.

Usage

simulation(object, control = list(...), ...)

# S4 method for Ib simulation(object, control = list(...), ...)

Arguments

object

an object of class union "Ib"

control

a control list

...

further argument to pass

Value

simulated responses.

Examples

Run this code
# NOT RUN {
## bootstrap poisson regression
counts <- c(18,17,15,20,10,20,25,13,12)
outcome <- gl(3,1,9)
treatment <- gl(3,3)
pois_fit <- glm(counts ~ outcome + treatment, family = poisson())

## make 100 paramtric bootstrap replicates
boot_dist <- simulate(pois_fit, nsim = 100)
# }

Run the code above in your browser using DataLab