locfit.censor | R Documentation |
locfit.censor
produces local regression estimates for censored
data. The basic idea is to use an EM style algorithm, where one
alternates between estimating the regression and the true values
of censored observations.
locfit.censor
is designed as a front end
to locfit.raw
with data vectors, or as an intemediary
between locfit
and locfit.raw
with a
model formula. If you can stand the syntax, the second calling
sequence above will be slightly more efficient than the third.
locfit.censor(x, y, cens, ..., iter=3, km=FALSE)
x |
Either a |
y |
If |
cens |
Logical variable indicating censoring. The coding is |
... |
Other arguments to |
iter |
Number of EM iterations to perform |
km |
If |
locfit
object.
Buckley, J. and James, I. (1979). Linear Regression with censored data. Biometrika 66, 429-436.
Loader, C. (1999). Local Regression and Likelihood. Springer, NY (Section 7.2).
Schmee, J. and Hahn, G. J. (1979). A simple method for linear regression analysis with censored data (with discussion). Technometrics 21, 417-434.
km.mrl
,
locfit
,
locfit.raw
data(heart, package="locfit")
fit <- locfit.censor(log10(surv+0.5) ~ age, cens=cens, data=heart)
## Can also be written as:
## Not run: fit <- locfit(log10(surv + 0.5) ~ age, cens=cens, data=heart, lfproc=locfit.censor)
with(heart, plotbyfactor(age, 0.5 + surv, cens, ylim=c(0.5, 16000), log="y"))
lines(fit, tr=function(x) 10^x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.