run_npvecchia: Wrapper to get the MAP given data

View source: R/basic_functions.R

run_npvecchiaR Documentation

Wrapper to get the MAP given data

Description

This wraps all of the smaller functions into one simple function to compute the MAP estimate of the upper Cholesky of the precision matrix.

Usage

run_npvecchia(
  datum,
  locs,
  corr_order = T,
  tapering_range = 0.4,
  threshh = 0.001,
  max_m = 50,
  init_theta = c(1, -1, 0)
)

Arguments

datum

an N * n matrix of the data (N replications of n locations/variables)

locs

an n*d matrix of data locations(to match input argument of fields::rdist)

corr_order

logical flag (defaults to TRUE). If true, uses correlation ordering. Otherwise, it uses maximin ordering based on locations.

tapering_range

Percentage of the maximum distance for Exponential tapering, which defaults to 0.4 * the maximum distance.

threshh

threshold for number of neighbors (for thetas_to_priors); defaults to 1e-3

max_m

number of neighbors to compute initially; a maximum number of neighbors possible for the methodology

init_theta

the initialization of the optimization to find the optimal theta

Value

A list of two elements: 1) u – a sparse triangular matrix that is the Cholesky of the precision matrix Ω such that

Ω = U U'

and 2) the order of the data that was used to calculate it (i.e. the reordered data is approximately normal with mean 0 and precision Ω)


katzfuss-group/NPVecchia documentation built on April 15, 2022, 2:23 a.m.