RegSpline: Regression Splines regression to draw centile curves

Description Usage Arguments Value Examples

View source: R/RegSpline.R

Description

Regression Splines regression to draw centile curves

Usage

1
RegSpline(x, y, cents = c(0.03, 0.25, 0.5, 0.75, 0.97))

Arguments

x

the explanatory variable - numeric

y

the response variable - numeric

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) )

Value

Plots the centile curves

Examples

1
2
3
4
5
6
7
#create a data frame
example<-data.frame(sample(30:42,100,rep=TRUE),sample(800:5000,100,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 centiles and plot the curves
RegSpline(x,y)

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