# R_smooth.FEM.basis: Spatial regression with differential regularization (fully... In fdaPDE: Functional Data Analysis and Partial Differential Equations; Statistical Analysis of Functional and Spatial Data, Based on Regression with Partial Differential Regularizations

## Description

Spatial regression with differential regularization (fully implemented in R code)

## Usage

 `1` ```R_smooth.FEM.basis(locations, observations, FEMbasis, lambda, covariates, GCV) ```

## Arguments

 `locations` A #observations-by-2 matrix where each row specifies the spatial coordinates of the corresponding observations in the vector `observations`. `observations` A #observations vector with the observed data values over the domain. The locations of the observations can be specified with the `locations` argument. Otherwise if only the vector of observations is given, these are consider to be located in the corresponding node in the table nodes of the mesh. In this last case, an `NA` value in the observations vector indicates that there is no observation associated to the corresponding node. `FEMbasis` A F`EMbasis` object describing the Finite Element basis, as created by `create.FEM.basis`. `lambda` A scalar or vector of smoothing parameters. `covariates` A #observations-by-#covariates matrix where each row represents the covariates associated with the corresponding observed data value in `observations`. `GCV` Boolean. If `TRUE` the following quantities are computed: the trace of the smoothing matrix, the estimated error standard deviation, and the Generalized Cross Validation criterion, for each value of the smoothing parameter specified in `lambda`.

## Value

A list with the following quantities:

 `fit.FEM` A `FEM` object that represents the fitted spatial field. `PDEmisfit.FEM` A `FEM` object that represents the Laplacian of the estimated spatial field. `beta` If covariates is not `NULL`, a vector of length #covariates with the regression coefficients associated with each covariate. `edf` If GCV is `TRUE`, a scalar or vector with the trace of the smoothing matrix for each value of the smoothing parameter specified in `lambda`. `stderr` If GCV is `TRUE`, a scalar or vector with the estimate of the standard deviation of the error for each value of the smoothing parameter specified in `lambda`. `GCV` If GCV is `TRUE`, a scalar or vector with the value of the GCV criterion for each value of the smoothing parameter specified in `lambda`.

## References

Sangalli, L.M., Ramsay, J.O. & Ramsay, T.O., 2013. Spatial spline regression models. Journal of the Royal Statistical Society. Series B: Statistical Methodology, 75(4), pp.681.703.

`smooth.FEM.basis`, `smooth.FEM.PDE.basis`, `smooth.FEM.PDE.sv.basis`