| Title: | Draw Nested Extreme Value Random Variables |
|---|---|
| Description: | Draw nested extreme value random variables, which are the variables that appear in the latent variable formulation of the nested logit model. |
| Authors: | Wilbur Townsend [aut, cre] |
| Maintainer: | Wilbur Townsend <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 1.0.0.0 |
| Built: | 2026-06-06 09:05:45 UTC |
| Source: | https://github.com/wilburtownsend/nev |
rnev draws nested extreme value random variables.
rnev( N, sigma, nests, tol = 0.001, lower_int = NULL, upper_int = NULL, lower_eval = -10, upper_eval = NULL, resolution = 2^15 )rnev( N, sigma, nests, tol = 0.001, lower_int = NULL, upper_int = NULL, lower_eval = -10, upper_eval = NULL, resolution = 2^15 )
N |
the number of vectors; |
sigma |
the parameter that measures within-nest correlation, expressed either as a length-num_nests vector or as a scalar (in which case sigma is assumed constant across nests); |
nests |
a vector of positive integers, indicating the nest of each alternative; |
tol |
the tolerance on the requirement that the approximate pdf be real-valued, non-negative, and equal to zero at its boundary; |
lower_int |
an argument passed to fourierin (default depends on sigma); |
upper_int |
an argument passed to fourierin (default depends on sigma); |
lower_eval |
an argument passed to fourierin (default = -10); |
upper_eval |
an argument passed to fourierin (default depends on sigma); |
resolution |
an argument passed to fourierin (default = 2^15). |
An N-by-length(nests) matrix, with each row being a draw from the nested extreme value distribution.
rnev(10, 0.5, c(1,1,2,3))rnev(10, 0.5, c(1,1,2,3))