View source: R/outlier_tests.R
counttest | R Documentation |
counttest()
conducts a test whether the number of detected outliers
deviates significantly from the expected number of outliers under the null
hypothesis that there are no outliers in the sample.
counttest( robust2sls_object, alpha, iteration, one_sided = FALSE, tsmethod = c("central", "minlike", "blaker") )
robust2sls_object |
An object of class |
alpha |
A numeric value between 0 and 1 representing the significance level of the test. |
iteration |
An integer >= 0 or the character "convergence" that determines which iteration is used for the test. |
one_sided |
A logical value whether a two-sided test ( |
tsmethod |
A character specifying the method for calculating two-sided p-values. Ignored for one-sided test. |
See outlier_detection()
and
multi_cutoff()
for creating an object of class
"robust2sls"
or a list thereof.
See exactci::poisson.exact()
for the
different methods of calculating two-sided p-values.
counttest()
returns a data frame with the iteration (m) to be
tested, the actual iteration that was tested (generally coincides with the
iteration that was specified to be tested but is the convergent iteration
if the fixed point is tested), the setting of the probability of exceeding
the cut-off (gamma), the number of detected outliers, the expected number
of outliers under the null hypothesis that there are no outliers, the type
of test (one- or two-sided), the p-value, the significance level
alpha
, the decision, and which method was used to calculate
(two-sided) p-values. The number of rows of the data frame corresponds to
the length of the argument robust2sls_object
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.