Last data update: 2014.03.03

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

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

Description

Simulated data from the function

y_ij = 4 π - x_i + cos(x_i - π/2) + e_ij

for x_i = 0,1, … , 12 ; n_i = 5 for i=0 and n_i=3 otherwise; e_ij ~ N(0, 0.5^2)

Format

A data frame with 41 observations on the following 2 variables.

y

a numeric vector

x

a numeric vector

Source

Murray, K., M<c3><83><c2><bc>ller, 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

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

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(MonoPoly)
Loading required package: quadprog
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/MonoPoly/w2.Rd_%03d_medium.png", width=480, height=480)
> ### Name: w2
> ### Title: Simulated w2 data used in Murray et al. (2013)
> ### Aliases: w2
> ### Keywords: datasets
> 
> ### ** Examples
> 
> str(w2)
'data.frame':	41 obs. of  2 variables:
 $ y: num  12.3 13.5 12.7 11.9 12.8 ...
 $ x: num  0 0 0 0 0 1 1 1 2 2 ...
> plot(y~x, w2)
> monpol(y~x, w2)

Monotone polynomial model
Call:
monpol(formula = y ~ x, data = w2)

Coefficients:
    beta0      beta1      beta2      beta3  
12.955524  -1.168273   0.023711  -0.001409  

> monpol(y~x, w2, K=2)

Monotone polynomial model
Call:
monpol(formula = y ~ x, data = w2, K = 2)

Coefficients:
     beta0       beta1       beta2       beta3       beta4       beta5  
 1.292e+01  -1.030e+00  -3.244e-02   4.376e-03   2.556e-05  -1.678e-05  

> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>