test_cpv: Critical and p-value for test statistic relative to simulated...

View source: R/outlier_tests.R

test_cpvR Documentation

Critical and p-value for test statistic relative to simulated distribution

Description

test_cpv returns the critical value corresponding to a given quantile of the simulated distribution and the p-value of the test statistic.

Usage

test_cpv(dist, teststat, p)

Arguments

dist

A numeric vector of simulated values approximating the distribution of the test statistic, e.g. generated as in mvn_sup().

teststat

A numeric value of the test statistic.

p

A numeric vector of probabilities with values in [0,1] for which the corresponding quantiles are calculated.

Value

A list with two named entries. $pval is the p-value of the test statistic with respect to the distribution dist. $q is the vector of sample quantiles in the distribution dist corresponding to the probabilities specified in p.


robust2sls documentation built on Jan. 11, 2023, 5:13 p.m.