Learn R Programming

factorMerger (version 0.3.1)

generateSample: 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

Run this code
# NOT RUN {
generateSample(100, 2)
generateSample(100, 2, "exp")

# }

Run the code above in your browser using DataLab