trend.spatial {geoR}R Documentation

Builds the Trend Matrix

Description

Builds the trend matrix according to the specification of the mean part of the model provided by the user.

Usage

trend.spatial(trend, coords = NULL)

Arguments

trend specifies the mean part of the model. The options are: "cte" (constant mean - default option), "1st" (a first degree polynomial on the coordinates), "2nd" (a second degree polynomial on the coordinates), or a formula of the type ~X where X is a matrix with the covariates (external trend).
coords an n x 2 matrix containing in each row Euclidean coordinates. Needs to be provided only if trend = "1st" or trend = "2nd".

Value

An n x p trend matrix where n is the number of spatial locations and p is the number of mean parameters in the model.

Note

This is an auxiliary function called by other geoR functions.

Author(s)

Paulo J. Ribeiro Jr. Paulo.Ribeiro@est.ufpr.br,
Peter J. Diggle p.diggle@lancaster.ac.uk.

References

Further information about geoR can be found at:
http://www.maths.lancs.ac.uk/~ribeiro/geoR.html.