Description Usage Arguments Details Value Author(s) References See Also Examples

Generates percentiles (100 based quantiles) for the distribution of product of two normal random variables and the mediated effect

1 2 | ```
pprodnormal(q, mu.x, mu.y, se.x=1, se.y=1, rho = 0, lower.tail=TRUE,
type="dop", n.mc=1e5)
``` |

`q` |
quantile or value of the product |

`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 |

`n.mc` |
when |

This function returns the percentile (probability) and the associated error for the distribution of product of
mediated effect (two normal random variables). To obtain a percentile using a
specific method, the argument `type`

should be specified. The
default method is `type="dop"`

, which is based on the method described by Meeker and Escobar (1994) to evaluate the CDF of the distribution of product of two
normal random variables. `type="MC"`

uses the Monte Carlo
approach (Tofighi & MacKinnon, 2011). `type="all"`

prints percentiles 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:

`p` |
probability (percentile) corresponding to quantile |

`error` |
estimate of the absolute error |

Davood Tofighi [email protected] and David P. MacKinnon [email protected]

MacKinnon, D. P., Fritz, M. S., Williams, J., and Lockwood, C. M. (2007). Distribution of the product confidence limits for the indirect effect: Program PRODCLIN. *Behavior Research Methods*, **39**, 384–389.

Meeker, W. and Escobar, L. (1994). An algorithm to compute the CDF of
the product of two normal random variables. *Communications in
Statistics: Simulation and Computation*, **23**, 271–280.

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`

`qprodnormal`

`RMediation-package`

1 | ```
pprodnormal(q=0, mu.x=.5, mu.y=.3, se.x=1, se.y=1, rho= 0, type="all")
``` |

```
Loading required package: MASS
Loading required package: lavaan
This is lavaan 0.5-23.1097
lavaan is BETA software! Please report any bugs.
Loading required package: e1071
$`Distribution of Product`
$`Distribution of Product`$p
[1] 0.4548488
$`Distribution of Product`$error
[1] 5.196031e-05
$`Monte Carlo`
$`Monte Carlo`$p
[1] 0.45917
$`Monte Carlo`$error
[1] 4.983326e-06
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.