PHat.test {reproducer} | R Documentation |
PHat.test
Description
This function provides single-sided and two-sided tests of the probability of superiority (phat).
Usage
PHat.test(x, y, alpha = 0.05, alternative = "two.sided", sigfig = -1)
Arguments
x |
The data from one group |
y |
The data from the alternative group |
alpha |
The significance level of tests which also controls the values of the confidence interval (default 0.05) |
alternative |
This defines whether a one-sided test or a two-sided (default) test is required. For a one-sided test use parameter values greater' or 'less' to define whether the d-value should be greater or less than zero. |
sigfig |
is the number of significant digits in the data. |
Value
The values of phat and its standard error,the t-value, its pvalue and the upper and lower confidence interval.
Author(s)
Barbara Kitchenham and Lech Madeyski
Examples
set.seed(456)
x <- rnorm(10, 0, 1)
y <- rnorm(10, 0.8, 1)
PHat.test(x, y, alpha = .05, alternative = "greater", sigfig = -1)
# A tibble: 1 x 8
# phat sqse.phat phat.df phat.tvalue phat.pvalue phat.ci.lower phat.ci.upper phat.sig
# <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <lgl>
# 1 0.79 0.0118 13.6 2.67 0.00924 0.599 1 TRUE
PHat.test(x, y, alpha = .05, alternative = "two.sided", sigfig = -1)
# A tibble: 1 x 8
# phat sqse.phat phat.df phat.tvalue phat.pvalue phat.ci.lower phat.ci.upper phat.sig
# <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <lgl>
# 1 0.79 0.0118 13.6 2.67 0.0185 0.557 1 TRUE
[Package reproducer version 0.5.3 Index]