View source: R/plot.bs.spline.r
plotbsSpline | R Documentation |
Plot the results of fitting a temporal b-spline.
plotbsSpline(X, fit, beg.x, end.x, eff0, option, bd2, ...)
X |
The basis b-spline matrix resulting from a call to function
|
fit |
The generalized linear model resulting from a call to function
|
beg.x |
The POSIX-formatted start date to use for plotting. |
end.x |
The POSIX-formatted end date to use for plotting. |
eff0 |
The default data frame containing efficiency trials for a
particular |
option |
The plotting option. Value |
bd2 |
The |
... |
Additional plotting control. |
Function plotbsSpline
simply organizes all the pieces
necessary to graph the prediction cubic piecewise polynomial resulting from
the use of a b-spline. It plots not only the (necessarily) smooth spline,
but also the original points used to estimate it. It also plots all knots,
i.e., both boundary and interior. It calculates the prediction via matrix
multiplication of the provided matrix basis X and the vector of
parameter β coefficients from object fit
.
This function is customized for use with the CAMP project, and will not work for splines derived from data originating elsewhere without modification.
A plot of the fitted cubic spline, its originating data points, and the knots utilized to achive the fit.
WEST Inc.
F.efficiency.model.enh
## Not run: # ---- Plot results from an efficiency model. Note that no parameter # ---- is provided for argument bd2 (batchDate2). plotbsSpline(X,fit,beg.x,end.x,tmp.df) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.