View source: R/shrink_simulate.R
shrink_simulate | R Documentation |
shrink_simulate(nobs, nrep, config)
nobs |
Number of observations (may be a vector) |
nrep |
Number of experiments for each |
config |
A data frame, consists information about the different cases
(values of true parameters) in the following columns: |
A tibble with length(nobs) * nrep * nrows(config)
rows. Each row
corresponds to an realization of an estimator, assumed to be an
approximation to an asymptotically normal estimator with root-n rate
(based on n observations). The simulations here are based on the
normal approximations, and consists of the following columns:
nobs
: Number of observations (affecting the standard
deviation). Values are from the given value in the corresponding
parameter nobs
.
case
: Identifier of the true case of the hypothesis.
g
and b
: The true parameters. Their values depends
on the parameters in the config, and on the current nobs
value:
γ_n = gfactor * nobs^gexp
; β_n =
bfactor * nobs^bexp
.
gestim
and bestim
: estimators for γ_n and
β_n, distributed independently from Normal distribution with
mean γ_n and β_n respectively, and with standard
deviation equals 1/√ n.
Simulate data for mediation estimation
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.