fs.test: FELSPLINE test function In fdaPDE: Functional Data Analysis and Partial Differential Equations (PDE); Statistical Analysis of Functional and Spatial Data, Based on Regression with PDE Regularization

 fs.test R Documentation

FELSPLINE test function

Description

Implements a finite area test function based on one proposed by Tim Ramsay (2002) proposed by Simon Wood (2008).

Usage

```fs.test(x, y, r0 = 0.1, r = 0.5, l = 3, b = 1, exclude = FALSE)
```

Arguments

 `x, y` Points at which to evaluate the test function. `r0` The test domain is a sort of bent sausage. This is the radius of the inner bend. `r` The radius of the curve at the centre of the sausage. `l` The length of an arm of the sausage. `b` The rate at which the function increases per unit increase in distance along the centre line of the sausage. `exclude` Should exterior points be set to NA?

Value

Returns function evaluations, or NAs for points outside the horseshoe domain.

References

• Ramsay, T. 2002. Spline smoothing over difficult regions. J.R.Statist. Soc. B 64(2):307-319

• Wood, S. N., Bravington, M. V., & Hedley, S. L. (2008). Soap film smoothing. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 70(5), 931-955.

Examples

```library(fdaPDE)

## Upload the horseshoe2D data
data(horseshoe2D)
boundary_nodes = horseshoe2D\$boundary_nodes
boundary_segments = horseshoe2D\$boundary_segments
locations = horseshoe2D\$locations

## Create the 2D mesh
mesh = create.mesh.2D(nodes = rbind(boundary_nodes, locations), segments = boundary_segments)
## Create the FEM basis
FEMbasis = create.FEM.basis(mesh)
## Compute the coeff vector evaluating the desired function at the mesh nodes
## In this case we consider the fs.test() function introduced by Wood et al. 2008
coeff = fs.test(mesh\$nodes[,1], mesh\$nodes[,2], exclude = FALSE)
## Create the FEM object
FEMfunction = FEM(coeff, FEMbasis)
## Plot it
plot(FEMfunction)
```

fdaPDE documentation built on Nov. 10, 2022, 5:06 p.m.