data("green")
# BIC criteria for choosing the optimal number of
# inter-knot segments in:
# a. Unconstrained quadratic spline fits
(kn.bic.green.u<-quad_spline_kn(log(green$COST),
log(green$OUTPUT), method="u", type="BIC"))
# b. Monotone quadratic spline smoother
(kn.bic.green.m<-quad_spline_kn(log(green$COST),
log(green$OUTPUT), method="m", type="BIC"))
# c. Monotone and concave quadratic spline smoother
(kn.bic.green.mc<-quad_spline_kn(log(green$COST),
log(green$OUTPUT), method="mc", type="BIC"))
Run the code above in your browser using DataLab