computeTPRS: Create TPRS basis

View source: R/functions_tprs.R

computeTPRSR Documentation

Create TPRS basis

Description

Compute TPRS basis for given spatial coordinates

Usage

computeTPRS(coords, maxdf, rearrange = TRUE, intercept = FALSE)

Arguments

coords

Data frame containing the coordinates.

maxdf

Largest number of splines to include in TPRS basis

rearrange

Logical indicator of whether to rearrange the columns of TPRS basis

intercept

Logical indicator of whether or not to remove the intercept column

Details

This function creates a TPRS basis using the mgcv package from the given coordinates with the option to rearrange the columns such that last two columns are moved to the left of the matrix and the third-from last column, which corresponds to the intercept, is optionally removed.

See Also

arrangeTPRS

Examples

x <- runif(100)
y <- runif(100)
mat <- computeTPRS(data.frame(x, y), maxdf=4)

jpkeller/spconf documentation built on March 11, 2024, 9:32 a.m.