window: Window selection function

Description Usage Arguments Value Examples

View source: R/window.R

Description

Window selection function

Usage

1
window(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 window value using cross validation or plug-in method

Examples

1
2
3
4
5
6
7
#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
window(x,y)

amouchot/nparamEstim documentation built on Feb. 6, 2021, 9:16 p.m.