Description Usage Arguments Value Examples
Centile curves using local polynomial compared to noise data
1 2 3 4 5 6 7 8 | locNormCstData(
x,
y,
bandwidth.method,
cents = c(0.03, 0.25, 0.5, 0.75, 0.97),
data,
leg = FALSE
)
|
x |
the explanatory variable - numeric |
y |
the response variable - numeric |
bandwidth.method |
the method chosen to calculate bandwidth. Could be cross validation or Plug-in. Default is set to 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 desplayed (TRUE) or not (FALSE). |
Plots centile curves with local constant polynomial and displays them on the same figure as the noise data to be compared
1 2 3 4 5 6 7 8 | #create an example data frame
example<-data.frame(sample(30:42,50,rep=TRUE),sample(800:5000,50,rep=TRUE))
colnames(example)<-c("Gestational Age in weeks","Weight in gramms")
x<-example$`Gestational Age in weeks`
y<-example$`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")
locNormCstData(x,y,bandwidth.method="Plug-in",cents=c(0.03,0.25,0.50,0.75,0.97),data=abnormal)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.