vecchia_estimate {GPvecchia}R Documentation

estimate mean and covariance parameters of a Matern covariance function using Vecchia

Description

estimate mean and covariance parameters of a Matern covariance function using Vecchia

Usage

vecchia_estimate(
  data,
  locs,
  X,
  m = 20,
  covmodel = "matern",
  theta.ini,
  output.level = 1,
  reltol = sqrt(.Machine$double.eps),
  ...
)

Arguments

data

data vector of length n

locs

n x d matrix of spatial locations

X

n x p matrix of trend covariates. default is vector of ones (constant trend). set to NULL if data are already detrended

m

number of neighbors for vecchia approximation. default is 20

covmodel

covariance model. default is Matern. see vecchia_likelihood for details.

theta.ini

initial values of covariance parameters. nugget variance must be last.

output.level

passed on to trace in the stats::optim function

reltol

tolerance for the optimization function; by default set to the sqrt of machine precision

...

additional input parameters for vecchia_specify

Value

object containing detrended data z, trend coefficients beta.hat, covariance parameters theta.hat, and other quantities necessary for prediction

Examples


n=10^2; locs=cbind(runif(n),runif(n))
covparms=c(1,.1,.5); nuggets=rep(.1,n)
Sigma=exp(-fields::rdist(locs)/covparms[2])+diag(nuggets)
z=as.numeric(t(chol(Sigma))%*%rnorm(n));
data=z+1
vecchia.est=vecchia_estimate(data,locs,theta.ini=c(covparms,nuggets[1]))


[Package GPvecchia version 0.1.7 Index]