qprodnormal | R Documentation |
Generates quantiles for the distribution of product of two normal random variables
qprodnormal(
p,
mu.x,
mu.y,
se.x,
se.y,
rho = 0,
lower.tail = TRUE,
type = "dop",
n.mc = 1e+05
)
p |
probability |
mu.x |
mean of |
mu.y |
mean of |
se.x |
standard error (deviation) of |
se.y |
standard error (deviation) of |
rho |
correlation between |
lower.tail |
logical; if |
type |
method used to compute confidence interval. It takes on the
values |
n.mc |
when |
This function returns a quantile and the associated error
(accuracy) corresponding the requested percentile (probability) p
of
the distribution of product of mediated effect (product of two normal
random variables). To obtain a quantile using a specific method, the
argument type
should be specified. The default method is
type="dop"
, which uses the method described by Meeker and Escobar
(1994) to evaluate the CDF of the distribution of product of two normal
variables. type="MC"
uses the Monte Carlo approach (Tofighi &
MacKinnon, 2011). type="all"
prints quantiles using all three
options. For the method type="dop"
, the error is the modulus of
absolute error for the numerical integration (for more information see
Meeker and Escobar, 1994). For type="MC"
, the error refers to the
Monte Carlo error.
An object of the type list
that contains the
following values:
q |
quantile corresponding to probability |
error |
estimate of the absolute error |
Davood Tofighi dtofighi@gmail.com
Tofighi, D. and MacKinnon, D. P. (2011). RMediation: An R package for mediation analysis confidence intervals. Behavior Research Methods, 43, 692–700. doi:10.3758/s13428-011-0076-x
medci
RMediation-package
##lower tail
qprodnormal(p=.1, mu.x=.5, mu.y=.3, se.x=1, se.y=1, rho=0,
lower.tail = TRUE, type="all")
##upper tail
qprodnormal(p=.1, mu.x=.5, mu.y=.3, se.x=1, se.y=1, rho=0,
lower.tail = FALSE, type="all")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.