Description Usage Arguments Value References Examples

Empirical power calculation using Royston test statistic.

1 | ```
power.mswR(a, n, p, B = 1000, FUN, ...)
``` |

`a` |
significance level ( |

`n` |
number of rows (observations). |

`p` |
number of columns (variables), |

`B` |
number of Monte Carlo simulations, default is 1000 (can increase B to increase the precision). |

`FUN` |
self-defined function for generate multivariate distribution. See example. |

`...` |
optional arguments passed to |

Returns a numeric value of the estimated empirical power (value between 0 and 1).

Royston, J. P. (1982). An extension of Shapiro and Wilk's W test for normality to large samples. *Journal of the Royal Statistical Society: Series C (Applied Statistics)*, 31(2), 115-124.

1 2 3 4 5 6 | ```
set.seed(12345)
## Power calculation against bivariate (p=2) independent Beta(1, 1) distribution ##
## at sample size n=50 at one-sided alpha = 0.05 ##
power.mswR(a = 0.05, n = 50, p = 2, B = 100, FUN=IMMV, D1=runif)
``` |

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.