find_param | R Documentation |
This function finds the optimal GIG parameters for the prior on W which induces a beta prior distribution on McFadden's R2.
find_param(
a,
b,
n,
K,
alpha = rep(1, K),
nsims = 1000,
nreps = 5,
no_cores = 10
)
a |
hyper-parameter of prior for R2 ~ Beta(a,b) |
b |
hyper-parameter of prior for R2 ~ Beta(a,b) |
n |
number of observations |
K |
number of response categories |
alpha |
prior hyper-parameters for prior Dirichlet distribution on response probabilities |
nsims |
number of times to simulate data |
nreps |
number of times to run the algorithm (default = 5) |
no_cores |
number of cores to parallelize data-generation process |
Optimal GIG parameters
a = 1
b = 5
n = 100
K = 3
find_param(a, b, n, K, no_cores=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.