Learn R Programming

metaLik (version 0.43.0)

simulate.metaLik: Simulate meta-analysis outcomes

Description

Simulate one or more meta-analysis outcomes from a fitted metaLik object.

Usage

# S3 method for metaLik
simulate(object, nsim=1, seed=NULL, ...)

Arguments

object

an object of class "metaLik".

nsim

number of outcome vectors to simulate. Default is 1.

seed

an object specifying if and how the random number generator should be initialized, see simulate for details.

...

additional optional arguments.

Value

A dataframe containing the simulated meta-analysis outcomes.

References

DerSimonian, R. and Laird, N. (1986). Meta-Analysis in Clinical Trials. Controlled Clinical Trials 7, 177--188.

Examples

Run this code
# NOT RUN {
data(vaccine)
m <- metaLik(y~latitude, data=vaccine, sigma2=sigma2)
sim <- simulate(m, nsim=2)
sim
# }

Run the code above in your browser using DataLab