Learn R Programming

ICE (version 0.69)

iclocpoly: Interval-Censored Local Polynomial Regression Estimation

Description

Local polynomial regression estimation for interval-censored data.

Usage

iclocpoly(x, y=NULL, y.IC, degree=0, h, niter=10, kernel="normal", gridsize=401)

Arguments

x
uncensored explanatory variable vector
y
uncensored portion of response vector (optional)
y.IC
two-column matrix of left and right interval endpoints for censored responses
degree
degree of local polynomial
h
bandwidth
niter
number of iterations
kernel
smoothing kernel to be used; default is "normal"; other choices as in the function locpoly
gridsize
number of gridpoints; again as in locpoly

Value

of the explanatory variable x and the imputed responses y as well as the estimate of sigma. Usually, one would apply locpoly with a similar bandwidth to obtain the final fitted model.

Examples

Run this code
library(KernSmooth)
data(motor.IC)
estimate <- iclocpoly(x=motor.IC$V1, y.IC = cbind(motor.IC$y.L, 
motor.IC$y.R), degree=0, h=1)
plot(motor.IC$V1, motor.IC$V2)
lines(locpoly(estimate$x, estimate$y, bandwidth=1, degree=0),col=4)

Run the code above in your browser using DataLab