
Translates an oldlogspline
object in an
logspline
object. This routine is mostly used in logspline
,
as it allows the routine to use oldlogspline
for some situations
where logspline
crashes. The other use is when you have censored data,
and thus have to use oldlogspline
to fit, but wish to use the
auxiliary routines from logspline
.
oldlogspline.to.logspline(obj, data)
object of the class logspline
. The call
component
of the new object is not useful. The delete
component of the old
object is ignored.
object of class logspline
the original data. Used to compute the range
component of the
new object. if data
is not available, the 1/(n+1) and n/(n+1)
quantiles of the fitted distribution are used for range
.
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
.
x <- rnorm(100)
fit.old <- oldlogspline(x)
fit.translate <- oldlogspline.to.logspline(fit.old,x)
fit.new <- logspline(x)
plot(fit.new)
plot(fit.old,add=TRUE,col=2)
#
# should look almost the same, the differences are the
# different fitting routines
#
Run the code above in your browser using DataLab