1\name{sm.sigma2.compare}
2
3\alias{sm.sigma2.compare}
4
5\title{Comparison across two groups of the error standard deviation in
6       nonparametric regression with two covariates.}
7
8\description{This function compares across two groups, in a hypothesis
9       test, the error standard deviation in nonparametric regression
10       with two covariates.}
11
12\usage{sm.sigma2.compare(x1, y1, x2, y2)}
13
14\arguments{
15  \item{x1}{a two-column matrix of covariate values for group 1.}
16  \item{y1}{a vector of responses for group 1.}
17  \item{x2}{a two-column matrix of covariate values for group 2.}
18  \item{y2}{a vector of responses for group 2.}
19  }
20
21\value{a p-value for the test of equality of standard deviations.}
22
23\section{Side Effects}{none.}
24
25\details{see the reference below.}
26
27\references{Bock, M., Bowman, A.W.\ \& Ismail, B. (2007).
28           Estimation and inference for error variance in bivariate
29           nonparametric regression.
30           \emph{Statistics \& Computing}, to appear.}
31
32\seealso{\code{\link{sm.sigma}}}
33
34\examples{
35\dontrun{
36with(airquality, {
37   x     <- cbind(Wind, Temp)
38   y     <- Ozone^(1/3)
39   group <- (Solar.R < 200)
40   sig1 <- sm.sigma(x[ group, ], y[ group], ci = TRUE)
41   sig2 <- sm.sigma(x[!group, ], y[!group], ci = TRUE)
42   print(c(sig1$estimate, sig1$ci))
43   print(c(sig2$estimate, sig2$ci))
44   print(sm.sigma(x[ group, ], y[ group], model = "constant", h = c(3, 5))$p)
45   print(sm.sigma(x[!group, ], y[!group], model = "constant", h = c(3, 5))$p)
46   print(sm.sigma2.compare(x[group, ], y[group], x[!group, ], y[!group]))
47})
48}}
49\keyword{nonparametric}
50\keyword{smooth}
51