sim_n_persons {gridsampler}R Documentation

Simulate n persons

Description

Function is a simple replicate wrapper around sim_one_person

Usage

sim_n_persons(prob, n, a = 10, ap = rep(1/length(a), length(a)))

Arguments

prob

Probability to draw a construct from a certain category.

n

Number of persons, i.e. grids to be sampled.

a

Possible number of attributes sampled from.

ap

Attribute probabilities, i.e. for each number of attributes given in a.

See Also

Other Simulations: sim_n_persons_x_times_many_n, sim_n_persons_x_times, sim_one_person

Examples

sim_n_persons(dexp(1:30, .05), n = 2, a = 10)
sim_n_persons(dexp(1:30, .05), n = 2, a = c(1, 30))
sim_n_persons(dexp(1:30, .05), n = 2, a = c(1, 30), ap = c(1,4))
sim_n_persons(dexp(1:30, .05), n = 2, a = 1:5, ap = c(1,1,2,2,3))


[Package gridsampler version 0.6 Index]