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

sm.sigma2.compare

Comparison across two groups of the error standard deviation in nonparametric regression with two covariates.


Description

This function compares across two groups, in a hypothesis test, the error standard deviation in nonparametric regression with two covariates.

Usage

sm.sigma2.compare(x1, y1, x2, y2)

Arguments

x1

a two-column matrix of covariate values for group 1.

y1

a vector of responses for group 1.

x2

a two-column matrix of covariate values for group 2.

y2

a vector of responses for group 2.

Details

see the reference below.

Value

a p-value for the test of equality of standard deviations.

Side Effects

none.

References

Bock, M., Bowman, A.W.\ \& Ismail, B. (2007). Estimation and inference for error variance in bivariate nonparametric regression. Statistics \& Computing, to appear.

See Also

Examples

## Not run: 
with(airquality, {
   x     <- cbind(Wind, Temp)
   y     <- Ozone^(1/3)
   group <- (Solar.R < 200)
   sig1 <- sm.sigma(x[ group, ], y[ group], ci = TRUE)
   sig2 <- sm.sigma(x[!group, ], y[!group], ci = TRUE)
   print(c(sig1$estimate, sig1$ci))
   print(c(sig2$estimate, sig2$ci))
   print(sm.sigma(x[ group, ], y[ group], model = "constant", h = c(3, 5))$p)
   print(sm.sigma(x[!group, ], y[!group], model = "constant", h = c(3, 5))$p)
   print(sm.sigma2.compare(x[group, ], y[group], x[!group, ], y[!group]))
})

## End(Not run)

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.