find_param {R2D2ordinal} | R Documentation |
Find optimal GIG parameters for W prior
Description
This function finds the optimal GIG parameters for the prior on W which induces a beta prior distribution on McFadden's R2.
Usage
find_param(
a,
b,
n,
K,
alpha = rep(1, K),
nsims = 1000,
nreps = 5,
no_cores = 10
)
Arguments
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 |
Value
Optimal GIG parameters
Examples
a = 1
b = 5
n = 100
K = 3
find_param(a, b, n, K, no_cores=1)
[Package R2D2ordinal version 1.0.1 Index]