powered by
Refers to section 7.2.
plot_gcv(age, pos, tot, nn_seq, h_seq, kern = "tcub", deg = 2)
plot of gcv value
the age vector.
the pos vector.
the tot vector.#'
Nearest neighbor sequence.
Smoothing parameter sequence.
Weight function, default = "tcub". Other choices are "rect", "trwt", "tria", "epan", "bisq" and "gauss". Choices may be restricted when derivatives are required; e.g. for confidence bands and some bandwidth selectors.
Degree of polynomial to use. Default: 2.
df <- mumps_uk_1986_1987 plot_gcv( df$age, df$pos, df$tot, nn_seq = seq(0.2, 0.8, by=0.1), h_seq = seq(5, 25, by=1) )
Run the code above in your browser using DataLab