## Not run:
# ## Plasma citrate data
# ## Compare cross-validation scores and bandwidths
# ## for local linear and local quadratic smoothing
#
# data(plasma)
# time <- 8:21
# ## Local linear smoothing
# cv.select(time, plasma, 1) # local solution h = 3.76, S(h) = 463.08
# cv.select(time, plasma, 1, interval = c(.5, 1)) # global solution = .75, S(h) = 439.54
#
# ## Local quadratic smoothing
# cv.select(time, plasma, 2) # global solution h = 1.15, S(h) = 432.75
# cv.select(time, plasma, 2, interval = c(1, 1.5)) # same
# ## End(Not run)
Run the code above in your browser using DataLab