A series of 133 measurements of head acceleration in a simulated motorcycle accident, used to test crash helmets.
times – time in milliseconds after impact
accel – acceleration in g
nw = npreg(y~xx,ckertype="epanechnikov",bws=0.01)
plot(xx,nw$mean,type="l",xlab=" ",ylab=" ",col="red")
lines(xx, f, lty=2,col="blue")
points(xx,y,pch="*")
title("Epanechnikov kernel (b=0.01)")
nw = npreg(y~xx,ckertype="epanechnikov",bws=.1)
nw.ep=npreg(y~xx,ckertype="epanechnikov")
##
Multistart 1 of 1 |
Multistart 1 of 1 |
Multistart 1 of 1 |
Multistart 1 of 1 /
Multistart 1 of 1 |
Multistart 1 of 1 |
##
## Regression Data: 75 training points, in 1 variable(s)
## xx
## Bandwidth(s): 0.04571446
##
## Kernel Regression Estimator: Local-Constant
## Bandwidth Type: Fixed
##
## Continuous Kernel Type: Second-Order Epanechnikov
## No. Continuous Explanatory Vars.: 1
nw.un=npreg(y~xx,ckertype="uniform")
##
Multistart 1 of 1 |
Multistart 1 of 1 |
Multistart 1 of 1 |
Multistart 1 of 1 /
Multistart 1 of 1 |
Multistart 1 of 1 |
##
## Regression Data: 75 training points, in 1 variable(s)
## xx
## Bandwidth(s): 0.09876352
##
## Kernel Regression Estimator: Local-Constant
## Bandwidth Type: Fixed
##
## Continuous Kernel Type: Uniform
## No. Continuous Explanatory Vars.: 1
nw.lin=npreg(y~xx,ckertype="epanechnikov", regtype="ll")
##
Multistart 1 of 1 |
Multistart 1 of 1 |
Multistart 1 of 1 |
Multistart 1 of 1 /
Multistart 1 of 1 |
Multistart 1 of 1 |
##
## Regression Data: 75 training points, in 1 variable(s)
## xx
## Bandwidth(s): 0.06647777
##
## Kernel Regression Estimator: Local-Linear
## Bandwidth Type: Fixed
##
## Continuous Kernel Type: Second-Order Epanechnikov
## No. Continuous Explanatory Vars.: 1
## Epanechnikov kernel: AMSE= 0.0022 ; uniform kernel: AMSE= 0.0222 ; Epanechnikov local linear regression: AMSE= 0.0054