plot.h.bcv: Plot for Biased Cross-Validation

Description Usage Arguments Value Author(s) See Also Examples

Description

The plot.h.bcv function loops through calls to the h.bcv function. Plot for biased cross-validation function for 1-dimensional data.

Usage

1
2
3
4
## S3 method for class 'h.bcv'
plot(x, seq.bws=NULL, ...)
## S3 method for class 'h.bcv'
lines(x,seq.bws=NULL, ...)

Arguments

x

object of class h.bcv (output from h.bcv).

seq.bws

the sequence of bandwidths in which to compute the biased cross-validation function. By default, the procedure defines a sequence of 50 points, from 0.15*hos to 2*hos (Over-smoothing).

...

other graphics parameters, see par in package "graphics".

Value

Plot of 1-d biased cross-validation function are sent to graphics window.

kernel

name of kernel to use.

deriv.order

the derivative order to use.

seq.bws

the sequence of bandwidths.

bcv

the values of the biased cross-validation function in the bandwidths grid.

Author(s)

Arsalane Chouaib Guidoum acguidoum@usthb.dz

See Also

h.bcv.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## EXAMPLE 1:

plot(h.bcv(trimodal, whichbcv = 1, deriv.order = 0),main="",sub="")
lines(h.bcv(trimodal, whichbcv = 2, deriv.order = 0),col="red")
legend("topright", c("BCV1","BCV2"),lty=1,col=c("black","red"),inset = .015)

## EXAMPLE 2:

plot(h.bcv(trimodal, whichbcv = 1, deriv.order = 1),main="",sub="")
lines(h.bcv(trimodal, whichbcv = 2, deriv.order = 1),col="red")
legend("topright", c("BCV1","BCV2"),lty=1,col=c("black","red"),inset = .015)

Example output

$kernel
[1] "gaussian"

$deriv.order
[1] 0

$seq.bws
 [1] 0.07221601 0.09039282 0.10856964 0.12674646 0.14492328 0.16310010
 [7] 0.18127691 0.19945373 0.21763055 0.23580737 0.25398419 0.27216100
[13] 0.29033782 0.30851464 0.32669146 0.34486828 0.36304509 0.38122191
[19] 0.39939873 0.41757555 0.43575237 0.45392918 0.47210600 0.49028282
[25] 0.50845964 0.52663646 0.54481327 0.56299009 0.58116691 0.59934373
[31] 0.61752054 0.63569736 0.65387418 0.67205100 0.69022782 0.70840463
[37] 0.72658145 0.74475827 0.76293509 0.78111191 0.79928872 0.81746554
[43] 0.83564236 0.85381918 0.87199600 0.89017281 0.90834963 0.92652645
[49] 0.94470327 0.96288009

$bcv
 [1] 0.020978010 0.017576162 0.015546542 0.014084318 0.012785614 0.011536567
 [7] 0.010345315 0.009249289 0.008277507 0.007441951 0.006741247 0.006166364
[13] 0.005704633 0.005342032 0.005064462 0.004858477 0.004711664 0.004612821
[19] 0.004552042 0.004520741 0.004511636 0.004518699 0.004537046 0.004562811
[25] 0.004593002 0.004625356 0.004658220 0.004690433 0.004721249 0.004750257
[31] 0.004777322 0.004802541 0.004826195 0.004848714 0.004870637 0.004892589
[37] 0.004915240 0.004939289 0.004965434 0.004994351 0.005026681 0.005063011
[43] 0.005103865 0.005149696 0.005200882 0.005257719 0.005320425 0.005389140
[49] 0.005463928 0.005544784

$kernel
[1] "gaussian"

$deriv.order
[1] 1

$seq.bws
 [1] 0.09967698 0.12476575 0.14985451 0.17494328 0.20003204 0.22512081
 [7] 0.25020957 0.27529834 0.30038710 0.32547587 0.35056463 0.37565339
[13] 0.40074216 0.42583092 0.45091969 0.47600845 0.50109722 0.52618598
[19] 0.55127475 0.57636351 0.60145228 0.62654104 0.65162981 0.67671857
[25] 0.70180734 0.72689610 0.75198486 0.77707363 0.80216239 0.82725116
[31] 0.85233992 0.87742869 0.90251745 0.92760622 0.95269498 0.97778375
[37] 1.00287251 1.02796128 1.05305004 1.07813880 1.10322757 1.12831633
[43] 1.15340510 1.17849386 1.20358263 1.22867139 1.25376016 1.27884892
[49] 1.30393769 1.32902645

$bcv
 [1] 1.006339007 0.675963333 0.500966550 0.361417323 0.250314674 0.168725911
 [7] 0.112391146 0.074843963 0.050379302 0.034761888 0.025025392 0.019142371
[13] 0.015739027 0.013885358 0.012956626 0.012542860 0.012384905 0.012326313
[19] 0.012277535 0.012190768 0.012043450 0.011828053 0.011545999 0.011204051
[25] 0.010812087 0.010381645 0.009924873 0.009453763 0.008979565 0.008512376
[31] 0.008060871 0.007632158 0.007231745 0.006863589 0.006530212 0.006232857
[37] 0.005971667 0.005745875 0.005553992 0.005393980 0.005263413 0.005159616
[43] 0.005079781 0.005021066 0.004980670 0.004955896 0.004944193 0.004943185
[49] 0.004950692 0.004964740

kedd documentation built on May 2, 2019, 7:32 a.m.