Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

sig.trace

A significance trace for a hypothesis test


Description

This function creates a significance trace for a hypothesis test based on a nonparametric smoothing procedure. The p-value of the test is plotted against a range of smoothing parameters.

Usage

sig.trace(expn, hvec, ...)

Arguments

expn

an S-Plus expression which should define the hypothesis test to be performed, with the value of the smoothing parameter h omitted from the function call.

hvec

a vector of smoothing parameters for which the test will be performed.

...

further arguments which will be passed to sm.options.

Details

see Section 5.2 of the reference below.

Only tests involving a univariate smoothing parameter may be used.

Value

a list containing vectors with the smoothing parameters and p-values.

Side Effects

If the largest p-value is greater than 0.05 then a horizontal line at 0.05 will be superimposed on any plot, for reference.

References

Bowman, A.W. and Azzalini, A. (1997). Applied Smoothing Techniques for Data Analysis: the Kernel Approach with S-Plus Illustrations. Oxford University Press, Oxford.

See Also

none.

Examples

x <- runif(50, 0, 1)
y <- 5*x^2 + rnorm(50)
sig.trace(sm.regression(x, y, model = "linear", display="none"), 
        hvec = seq(0.05, 0.3, length = 10))

sm

Smoothing Methods for Nonparametric Regression and Density Estimation

v2.2-5.6
GPL (>= 2)
Authors
Adrian Bowman and Adelchi Azzalini. Ported to R by B. D. Ripley <ripley@stats.ox.ac.uk> up to version 2.0, version 2.1 by Adrian Bowman and Adelchi Azzalini, version 2.2 by Adrian Bowman.
Initial release
2018-09-27

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.