R: Generate sample

generateSample {factorMerger} | R Documentation

## Generate sample

### Description

Produces a random sample of k groups drawn from the same distribution with different parameters.

### Usage

    generateSample(N, k, distr = "gaussian")

### Arguments

`N` | sample size
`k` | number of groups
`distr` | type of distribution from `c("norm", "exp", "beta")`

### Value

`list` with two fields: numeric variable `response` and factor variable `factor`.

### Examples

    generateSample(100, 2)
    generateSample(100, 2, "exp")

[Package factorMerger version 0.3.2 Index]