Description Usage Arguments Value Examples
View source: R/utility_functions.R
Given a set of Monte Carlo samples, estimates a p-value
from the proportion of values that fall above or below
a comparison point. If string
is TRUE
,
takes a numeric p-value and converts it into a
formatted character string, either 'p = ...' or
'p < ...'.
1 | pvalueMC(x, comparison = 0, alternative = "two-sided", digits = 3)
|
x |
either 1) a vector of numeric values (Monte Carlo samples) or 2) a single p-value. |
comparison |
the comparison point used to compute the p-value for the Monte Carlo samples. |
alternative |
a character string, either 1) 'two-sided', 2) 'greater', or 3) 'less', indicating the type of alternativ hypothesis to test. If 'two-sided', uses the alternativ hypothsis that produces the smallest p-value, and then adjusts for the two-sided comparison by multiplying by two. |
digits |
the number of digits to round to when formatting the numeric p-value |
Either a numeric p-value or a character string, a nicely formatted version of the p-value.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.