View source: R/helper_functions.R
| getNonZeros | R Documentation |
Estimate the location of non-zeros (signals) implied by horseshoe-type thresholding.
getNonZeros(post_evol_sigma_t2, post_obs_sigma_t2 = NULL)
post_evol_sigma_t2 |
the |
post_obs_sigma_t2 |
the |
Thresholding is based on kappa[t] > 1/2, where
kappa = 1/(1 + evol_sigma_t2/obs_sigma_t2), evol_sigma_t2 is the
evolution error variance, and obs_sigma_t2 is the observation error variance.
In particular, the decision rule is based on the posterior mean of kappa.
A vector (or matrix) of indices identifying the signals according to the horsehoe-type thresholding rule.
The thresholding rule depends on whether the prior variance for the state
variable mu (i.e., evol_sigma_t2) is scaled by the observation standard
deviation, obs_sigma_t2. Explicitly, if mu[t] ~ N(0, evol_sigma_t2[t])
then the correct thresholding rule is based on kappa = 1/(1 + evol_sigma_t2/obs_sigma_t2).
However, if mu[t] ~ N(0, evol_sigma_t2[t]*obs_sigma_t2[t])
then the correct thresholding rule is based on kappa = 1/(1 + evol_sigma_t2).
The latter case may be implemented by omitting the input for post_obs_sigma_t2
(or setting it to NULL).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.