# fs.test: FELSPLINE test function In fdaPDE: Statistical Analysis of Functional and Spatial Data, Based on Regression with PDE Regularization

## Description

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

## Usage

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

## 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.

## 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

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19``` ```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]) ## Create the FEM object FEMfunction = FEM(coeff, FEMbasis) ## Plot it plot(FEMfunction) ```

fdaPDE documentation built on July 2, 2020, 2:22 a.m.