generate.data2d: Generate 2d data

View source: R/generate.data2d.R

generate.data2dR Documentation

Generate 2d data

Description

Generate two-dimensional data related to the f1 function of Lu et al. (2012) (code from author). Define n = c(60, 80). Then x[[i]] = (1:n[i])/n[i] - 1/2/n[i]. These are the observed data locations. For i and j spanning the full length of each element of x, mu2d[i, j] = sin(2 * pi * (x[[1]][i] - .5) ^ 3) * cos(4 * pi * x[[2]][j]). Lastly, data2d = mu2d + rnorm(prod(n)).

Usage

generate.data2d()

generate_data2d()

generateData2d()

GenerateData2d()

Value

A list with components x, mu2d, and data2d. x is a list of sequences with length 60 and 80. mu2d and data2d are matrices of size 60 by 80.

Author(s)

Joshua French. Based off code by Luo Xiao (see References).

References

Xiao, L. , Li, Y. and Ruppert, D. (2013), Fast bivariate P-splines: the sandwich smoother. J. R. Stat. Soc. B, 75: 577-599. <doi:10.1111/rssb.12007>

Examples

dat = generate.data2d()

hero documentation built on July 26, 2023, 5:11 p.m.