bandwidth | R Documentation |
bandwidth selection function
bandwidth(x, y, method = "CV")
x |
the explanatory variable - numeric |
y |
the response variable - numeric |
method |
the bandwidth method choice: CV or plug-in. Default is CV. |
Calculates the bandwidth value using cross validation or plug-in method (for localLin and localCst methods)
#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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.