polylocLinData: Polynomial local linear estimator compared to noise data

Description Usage Arguments Value Examples

View source: R/compareCurv.R

Description

Polynomial local linear estimator compared to noise data

Usage

1
2
3
4
5
6
7
8
polylocLinData(
  x,
  y,
  bandwidth.method = "Plug-in",
  cents = c(0.03, 0.25, 0.5, 0.75, 0.97),
  data,
  leg = FALSE
)

Arguments

x

the explanatory variable - numeric

y

the response variable - numeric

bandwidth.method

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

cents

A numeric vector that represents the centiles calculated. Default is set to cents=c(0.03,0.25,0.5,0.75,0.97)).

data

the noise data we want to compare

leg

Boolean. Should the legend be displayed (TRUE) or not (FALSE).

Value

Plots the centile curves and data points to compare with.

Examples

1
2
3
4
5
6
7
8
#create a sample data frame
sample<-data.frame(sample(30:42,50,rep=TRUE),sample(800:5000,50,rep=TRUE))
colnames(sample)<-c("Gestational Age in weeks","Weight in gramms")
x<-sample$`Gestational Age in weeks`
y<-sample$`Weight in gramms`
abnormal<-data.frame(sample(30:42,10,rep=TRUE),sample(800:5000,10,rep=TRUE))
colnames(abnormal)<-c("Gestational Age in weeks","Weight in gramms")
polylocLinData(x,y,bandwidth.method="Plug-in",cents=c(0.03,0.25,0.50,0.75,0.97),data=abnormal)

HugoBrtn/quantCurves documentation built on Dec. 31, 2021, 12:01 a.m.