plot.oldlogspline | R Documentation |
Plots an oldlogspline
density, distribution function, hazard
function or survival function
from
a logspline density that was fitted using
the 1992 knot deletion algorithm.
The 1997 algorithm using knot
deletion and addition is available using the logspline
function.
## S3 method for class 'oldlogspline'
plot(x, n = 100, what = "d", xlim, xlab = "", ylab = "",
type = "l", add = FALSE, ...)
x |
|
n |
the number of equally spaced points at which to plot the density. |
what |
what should be plotted:
|
xlim |
range of data on which to plot. Default is from the 1th to the 99th percentile of the density, extended by 10% on each end. |
xlab , ylab |
labels plotted on the axes. |
type |
type of plot. |
add |
should the plot be added to an existing plot. |
... |
other plotting options, as desired |
This function produces a plot of a oldlogspline
fit at n
equally
spaced points roughly covering the support of the density. (Use
xlim=c(from,to)
to change the range of these points.)
Charles Kooperberg clk@fredhutch.org.
Charles Kooperberg and Charles J. Stone. Logspline density estimation for censored data (1992). Journal of Computational and Graphical Statistics, 1, 301–328.
Charles J. Stone, Mark Hansen, Charles Kooperberg, and Young K. Truong. The use of polynomial splines and their tensor products in extended linear modeling (with discussion) (1997). Annals of Statistics, 25, 1371–1470.
logspline
,
oldlogspline
,
summary.oldlogspline
,
doldlogspline
,
poldlogspline
,
qoldlogspline
,
roldlogspline
.
y <- rnorm(100)
fit <- oldlogspline(y)
plot(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.