Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dhmre_pairwise

Implied density for pairwise differences given HMRE prior.


Description

Computes the implied densities of random effect differences given HMRE prior.

Usage

dhmre_pairwise(x, mu = 0, sigma = 1)

Arguments

x

Numeric. Difference in random effects.

mu

Numeric. HMRE Prior location.

sigma

Numeric. (Default: 1; must be > 0). HMRE prior scale.

Details

The HMRE prior for the RE-SD is \int N^+(σ_p | exp(h_p))LN(h_p | 4μ, √{4}σ)dh_p. The random effects are distributed as u_{k,p} \sim N(0, σ_p). The implied prior is therefore u_{k,p} - u_{\lnot k, p} \sim N(0, √{2}σ). Note that there is a singularity at 0, because the integrand at sigma = 0 is an infinite spike. We currently integrate (using a change of variables) starting at machine precision-zero. Consider this the approximation of the limit as we approach 0 positively. This is therefore divergent when assessed at a difference of zero, due to the RESD taking on a zero value (and an infinite function value). This is expected, as the limit of a Gaussian as sigma -> 0 is the Dirac delta function.

Value

Numeric vector.

Author(s)

Stephen R. Martin


MIRES

Measurement Invariance Assessment Using Random Effects Models and Shrinkage

v0.1.0
MIT + file LICENSE
Authors
Stephen Martin [aut, cre] (<https://orcid.org/0000-0001-8085-2390>), Philippe Rast [aut] (<https://orcid.org/0000-0003-3630-6629>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.