Learn R Programming

spdesign (version 0.0.5)

make_draws: Make random draws

Description

A common interface to creating a variety of random draws used to simulate the log likelihood function

Usage

make_draws(n_ind, n_draws, n_dim, seed, type)

Value

A matrix of dimensions n_ind*n_draws x n_dim of standard uniform draws

Arguments

n_ind

Number of individuals in your sample

n_draws

Number of draws per respondent

n_dim

Number of dimensions

seed

A seed to change the scrambling of the sobol sequence.

type

A character string

Examples

Run this code
n_ind <- 10
n_draws <- 5
n_dim <- 3

draws <- make_draws(n_ind, n_draws, n_dim, seed = 10, "scrambled-sobol")
head(draws)

draws <- make_draws(n_ind, n_draws, n_dim, seed = 10, "scrambled-halton")
head(draws)

Run the code above in your browser using DataLab