Learn R Programming

cobs (version 0.9-3)

exHe: Small Dataset Example of He

Description

The exHe data frame has 10 rows and 2 columns. It is an example for which smooth.spline cannot be used.

Usage

data(exHe)

Arguments

source

Found at the bottom of http://ux6.cso.uiuc.edu/~x-he/ftp.html, signed by x-he@uiuc.edu.

Examples

Run this code
data(exHe)
plot(exHe, main = "He's 10 point example and cobs() fits")
tm <- tapply(exHe$y, exHe$x, mean)
lines(unique(exHe$x), tm, lty = 2)
## 4 warnings :
cH  <- cobsOld(exHe$x, exHe$y, constraint = "increase")
lines(cH$z, cH$fit, col = 3)
cHn <- cobsOld(exHe$x, exHe$y, constraint = "none")
lines(cHn$z, cHn$fit, col = 4)
cHd <- cobsOld(exHe$x, exHe$y, constraint = "decrease")
lines(cHd$z, cHd$fit, col = 5)

Run the code above in your browser using DataLab