Learn R Programming

refund (version 0.1-40)

gen_random_2d: Generate 2D random surface from tensor P-spline prior

Description

Samples from tensor product P-spline prior and evaluates on fixed grids. Returns a matrix scaled to unit SD.

Usage

gen_random_2d(s_grid, t_grid, k_s, k_t, wiggliness)

Value

Matrix (length(s_grid) x length(t_grid)), scaled to unit SD.

Arguments

s_grid

First dimension evaluation points.

t_grid

Second dimension evaluation points.

k_s

Basis dimension for s.

k_t

Basis dimension for t.

wiggliness

Controls smoothness.