bandwidth {quantCurves}R Documentation

bandwidth selection function

Description

bandwidth selection function

Usage

bandwidth(x, y, method = "CV")

Arguments

x

the explanatory variable - numeric

y

the response variable - numeric

method

the bandwidth method choice: CV or plug-in. Default is CV.

Value

Calculates the bandwidth value using cross validation or plug-in method (for localLin and localCst methods)

Examples

#create a data frame
example<-data.frame(sample(30:42,10,rep=TRUE),sample(800:5000,10,rep=TRUE))
colnames(example)<-c("Gestational Age in weeks","Weight in gramms")
x<-example$`Gestational Age in weeks`
y<-example$`Weight in gramms`
#calculate the window value
bandwidth(x,y)


[Package quantCurves version 1.0.0 Index]