calculate_m_eff: Compute inverse of 'solve_for_hiershrink_scale'

View source: R/calculate_m_eff.R

calculate_m_effR Documentation

Compute inverse of 'solve_for_hiershrink_scale'

Description

Instead of providing a desired effective number of parameters, the user provides the scale value, which is c / sigma, in the notation of Boonstra and Barbaro, and the function gives the implied prior number of effective parameters based upon this value.

Usage

calculate_m_eff(
  scale,
  npar,
  local_dof = 1,
  global_dof = 1,
  slab_precision = (1/15)^2,
  n,
  n_sim = 2e+05
)

Arguments

scale

(pos. real) the scale parameter, defined as c / sigma.

npar

(pos. integers): the number of covariates.

local_dof

(pos. integer) number indicating the degrees of freedom for lambda_j. Boonstra and Barbaro always used local_dof = 1. Choose a negative value to tell the function that there are no local hyperparameters.

global_dof

(pos. integer) number indicating the degrees of freedom for tau. Boonstra and Barbaro always used global_dof = 1. Choose a negative value to tell the function that there is no global hyperparameter.

slab_precision

(pos. real) the slab-part of the regularized horseshoe, this is equivalent to (1/d)^2 in the notation of Boonstra and Barbaro

n

sample size

n_sim

number of simulates

Value

the implied number of effective parameters.


umich-biostatistics/AdaptiveBayesianUpdates documentation built on May 21, 2024, 5:29 a.m.