pval: Compute p-values for 'RPtest' output

Description Usage Arguments Details Value References See Also

View source: R/pvals.R

Description

Produces p-values given a list of simulated test statistics and the true test statistic (which may be a vector if it is the output of multiple RP functions).

Usage

1
pval(test, test_sim)

Arguments

test

A numeric vector of test statistics.

test_sim

A list of test statisitcs, each component of which is a numeric vector.

Details

In the case where the individual test statistics are vectors, the first component of test is compared against the first components of test_sim[[1]], test_sim[[2]] etc. and the results of these multiple comparisons are combined into a single p-value (see the reference). When the lengths of the test statistics differ, the final components are first discarded to make all the test statistics have equal length.

Value

A single p-value.

References

Shah, R. D., Buhlmann, P. (2017) Goodness of fit tests for high-dimensional linear models https://rss.onlinelibrary.wiley.com/doi/10.1111/rssb.12234

See Also

RPtest the output of which this would typically be applied to.


RPtests documentation built on July 11, 2021, 1:06 a.m.

Related to pval in RPtests...