Spatial regression with differential regularization: stationary and isotropic case (Laplacian)
Description
This function implements a spatial regression model with differential regularization; isotropic and stationary case. In particular, the regularizing term involves the Laplacian of the spatial field. Spacevarying covariates can be included in the model. The technique accurately handle data distributed over irregularly shaped domains. Moreover, various conditions can be imposed at the domain boundaries.
Usage
1 2 
Arguments
locations 
A #observationsby2 matrix where each row specifies the spatial coordinates 
observations 
A vector of length #observations with the observed data values over the domain.
The locations of the observations can be specified with the 
FEMbasis 
A 
lambda 
A scalar or vector of smoothing parameters. 
covariates 
A #observationsby#covariates matrix where each row represents the covariates associated with the corresponding observed data value in 
BC 
A list with two vectors:

GCV 
Boolean. If 
CPP_CODE 
Boolean. If 
Value
A list with the following variables:

A 

A 

If covariates is not 

If GCV is 

If GCV is 

If GCV is 
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. 681703.
See Also
smooth.FEM.PDE.basis
, smooth.FEM.PDE.sv.basis
Examples
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28  library(fdaPDE)
## Load the Meuse data and a domain boundary for these data
data(MeuseData)
data(MeuseBorder)
## Create a triangular mesh for these data with the provided boundary and plot it
order=1
mesh < create.MESH.2D(nodes = MeuseData[,c(2,3)], segments = MeuseBorder, order = order)
plot(mesh)
## Create the Finite Element basis
FEMbasis = create.FEM.basis(mesh)
## Estimate zync field without using covariates, setting the smoothing parameter to 10^3.5
data = log(MeuseData[,"zinc"])
lambda = 10^3.5
ZincMeuse = smooth.FEM.basis(observations = data,
FEMbasis = FEMbasis, lambda = lambda)
## Plot the estimated spatial field
plot(ZincMeuse$fit.FEM)
# Now repeat the analysis using as covariates the square root of the logdistance
# from river \code{sqrt(dist.log(m))} and the altitude \code{elev}
desmat = matrix(1,nrow=nrow(MeuseData),ncol=2)
desmat[,1] = sqrt(MeuseData[,"dist.log(m)"])
desmat[,2] = MeuseData[,"elev"]
ZincMeuseCovar = smooth.FEM.basis(observations = data, covariates = desmat,
FEMbasis = FEMbasis, lambda = lambda)
# Plot of the non parametric part (f) of the regression model y_i = beta_1 x_i1 + beta_2 x_i2 + f
plot(ZincMeuseCovar$fit.FEM)
# Print covariates' regression coefficients
print(ZincMeuseCovar$beta)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.