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")
)
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
.
An object of class "robust2sls"
or a
list of such objects.
A numeric value between 0 and 1 representing the significance level of the test.
An integer >= 0 or the character "convergence" that determines which iteration is used for the test.
A logical value whether a two-sided test (FALSE
)
should be conducted or a one-sided test (TRUE
) that rejects only
when the number of detected outliers is above the expected number.
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.