matern_spheretime: Matern covariance function on sphere x time

Description Usage Arguments Value Functions Covariances on spheres

View source: R/RcppExports.R

Description

From a matrix of longitudes, latitudes, and times, and a vector covariance parameters of the form (variance, range_1, range_2, smoothness, nugget), return the square matrix of all pairwise covariances.

Usage

1
2
3
matern_spheretime(covparms, lonlattime)

d_matern_spheretime(covparms, lonlattime)

Arguments

covparms

A vector with covariance parameters in the form (variance, range_1, range_2, smoothness, nugget), where range_1 is a spatial range (assuming sphere of radius 1), and range_2 is a temporal range.

lonlattime

A matrix with n rows and three columns: longitudes in (-180,180), latitudes in (-90,90), and times. Each row of lonlattime describes a point on the sphere x time.

Value

A matrix with n rows and n columns, with the i,j entry containing the covariance between observations at lonlattime[i,] and lonlattime[j,].

Functions

Covariances on spheres

The function first calculates the (x,y,z) 3D coordinates, and then inputs the resulting locations into matern_spacetime. This means that we construct covariances on the sphere by embedding the sphere in a 3D space. There has been some concern expressed in the literature that such embeddings may produce distortions. The source and nature of such distortions has never been articulated, and to date, no such distortions have been documented. Guinness and Fuentes (2016) argue that 3D embeddings produce reasonable models for data on spheres.


GpGp documentation built on June 10, 2021, 1:07 a.m.