sm.ancova(x, y, group, h, display="lines", model="none", band=T, test=T, h.alpha=(2 * diff(range(x)))/length(x), ngrid=50, eval.points=NA, xlab, ylab, ...)
x
| a vector of covariate values. |
y
| a vector of response values. |
group
| a vector of group indicators. |
h
| the smoothing parameter to be used in the construction of each of the regression curves. |
display
|
any character setting other than "none" will cause a plot of the curves,
distinguished by line type, to be produced.
|
model
|
a character variable which defines the reference model. The values
"none" , "equal" and "parallel" are possible.
|
band
| a logical flag controlling the production of a reference band for the reference model. A band will be produced only in the case of two groups. |
test
| a logical flag controlling the production of a formal test, using the reference model as the null hypothesis. |
h.alpha
| the value of the smoothing parameter used when estimating the vertical separations of the curves under the parallelism model. |
ngrid
| the size of the grid used to plot the curves. |
eval.points
| a vector of points at which reference bands will be evaluated. |
xlab
| the label attached to the x-axis. |
ylab
| the label attached to the y-axis. |
...
| additional graphical parameters. |
Young, S.G. and Bowman, A.W. (1995). Nonparametric analysis of covariance. Biometrics 51, 920-931.
Bowman, A.W. and Young, S.G. (1996). Graphical comparison of nonparametric curves. Applied Statistics 45, 83-98.
sm.regression
, sm.density.compare
x <- runif(50, 0, 1) y <- 4*sin(6*x) + rnorm(50) g <- rbinom(50, 1, 0.5) sm.ancova(x, y, g, h = 0.15, model = "equal")