simulateData {CNPBayes} | R Documentation

## Create simulated data for testing.

### Description

Create simulated data for testing.

### Usage

    simulateData(N, p, theta, sds, df = 10)

### 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
`df` | length-1 numeric vector for the t-distribution degrees of freedom

### Value

An object of class 'SingleBatchModel'

### Examples

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

[Package CNPBayes version 1.12.0 Index]