Learn R Programming

CNPBayes (version 1.2.2)

simulateData: Create simulated data for testing.

Description

Create simulated data for testing.

Usage

simulateData(N, p, theta, sds)

Arguments

N
number of observations
p
a vector indicating probability of membership to each component
theta
a vector of means, one per component
sds
a vector of standard deviations, one per component

Value

An object of class 'MarginalModel'

Examples

Run this code
truth <- simulateData(N=2500, p=rep(1/3, 3),
                      theta=c(-1, 0, 1),
                      sds=rep(0.1, 3))

Run the code above in your browser using DataLab