Learn R Programming

MonoPoly (version 0.2-8)

w2: Simulated w2 data used in Murray et al. (2013)

Description

Simulated data from the function $$y_{ij} = 4 \pi - x_i + \cos(x_i - \frac{\pi}{2}) + e_{ij}$$ for $x_i = 0,1, \ldots , 12$ ; $n_i = 5$ for $i=0$ and $n_i=3$ otherwise; $e_{ij} \sim N(0,0.5^2)$

Arguments

source

Murray, K., Mueller, S. and Turlach, B.A. (2013). Revisiting fitting monotone polynomials to data, Computational Statistics 28(5): 1989--2005. Doi:10.1007/s00180-012-0390-5.

Examples

Run this code
str(w2)
plot(y~x, w2)
monpol(y~x, w2)
monpol(y~x, w2, K=2)

Run the code above in your browser using DataLab