Last data update: 2014.03.03

R: Interval-Censored Local Polynomial Regression Estimation
iclocpolyR Documentation

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

A list consisting 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

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)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(ICE)
Loading required package: KernSmooth
KernSmooth 2.23 loaded
Copyright M. P. Wand 1997-2009
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/ICE/iclocpoly.Rd_%03d_medium.png", width=480, height=480)
> ### Name: iclocpoly
> ### Title: Interval-Censored Local Polynomial Regression Estimation
> ### Aliases: iclocpoly
> ### Keywords: models
> 
> ### ** Examples
> 
> 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)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>