np.graph {ssym} | R Documentation |
Tool to plot natural cubic splines or P-splines.
Description
np.graph displays a graph of a fitted nonparametric effect, either natural cubic spline or P-spline, from an object of class ssym
.
Usage
np.graph(object, which, var, exp, simul, obs, xlab, ylab, xlim, ylim, main)
Arguments
object |
an object of the class |
which |
an integer indicating the interest submodel. For example, 1 indicates location submodel, and 2 indicates skewness (or relative dispersion) submodel. |
var |
character. It allows to choosing the nonparametric effect using the name of the associated explanatory variable. |
exp |
logical. If |
simul |
logical. If |
obs |
logical. If |
xlab |
character. An optional label for the x axis. |
ylab |
character. An optional label for the y axis. |
xlim |
numeric. An optional range of values for the x axis. |
ylim |
numeric. An optional range of values for the y axis. |
main |
character. An optional overall title for the plot. |
Author(s)
Luis Hernando Vanegas <hvanegasp@gmail.com> and Gilberto A. Paula
References
Lancaster, P. and Salkauskas, K. (1986) Curve and Surface Fitting: an introduction. Academic Press, London. Green, P.J. and Silverman, B.W. (1994) Nonparametric Regression and Generalized Linear Models, Boca Raton: Chapman and Hall. Eilers P.H.C. and Marx B.D. (1996). Flexible smoothing with B-splines and penalties. Statistical Science. 11, 89-121.
Examples
#data("Ovocytes", package="ssym")
#fit <- ssym.l(fraction ~ type + psp(time) | type + psp(time), data=Ovocytes,
# family='Powerexp', xi=-0.55)
#
#par(mfrow = c(1,2))
#np.graph(fit, which=1, xlab="Time", main="Location")
#np.graph(fit, which=2, exp=TRUE, xlab="Time", main="Dispersion")