# lpsmooth: non-parametric regression In bda: Density Estimation for Grouped Data

## Description

To fit nonparametric regression model.

## Usage

 ```1 2``` ``` lpsmooth(y,x, bw, sd.y,lscv=FALSE, adaptive=FALSE, from, to, gridsize,conf.level=0.95) ```

## Arguments

 `y,x` Two numerical vectors. `from,to,gridsize` start point, end point and size of a fine grid where the EDF will be evaluated. `bw` Smoothing parameter. Numeric or character value is allowed. If missing, adaptive (LSCV) bandwidth selector will be used. `lscv,adaptive` If `lscv = FALSE`, use the given bandwidth to fit lpr directly. If `lscv = TRUE` and `adaptive = FALSE`, compute lscv bandwidth and fit lpr. Initial bandwidth should be given. If `lscv = TRUE` and `adaptive = TURE`, compute lscv bandwidth, then compute varying smoothing parameter, then fit lpr. This algorithm could be extremeely slow when the sample size is very large. `sd.y` Standard deviation of `y`. `conf.level` Confidence level.

## Author(s)

B. Wang [email protected]

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13``` ``` x <- rnorm(100,34.5,1.5) e <- rnorm(100,0,2) y <- (x-32)^2 + e out <- lpsmooth(y,x) out plot(out, type='l', scb=TRUE) x0 <- seq(min(x),max(x),length=100) y0 <- (x0-32)^2 lines(x0, y0, col=2) points(x, y, pch="*", col=4) ```

bda documentation built on Jan. 5, 2018, 9:04 a.m.