singl_log_lik: Evaluate log-lik

View source: R/log-lik.R

singl_log_likR Documentation

Evaluate log-lik

Description

Evaluate the log-likelihood for a given set of parameters

Usage

singl_log_lik(
  theta,
  .dt,
  dists,
  npix,
  model,
  nu = NULL,
  tr = NULL,
  kappa = 1,
  mu2 = 1.5,
  apply_exp = FALSE
)

Arguments

theta

a numeric vector of size 4 (μ, σ^2, τ^2, φ) containing the parameters associated with the model.

.dt

a numeric vector containing the variable Y.

dists

a list of size distance matrices at the point level.

npix

a integer vector containing the number of pixels within each polygon. (Ordered by the id variables for the polygons).

model

a character indicating which covariance function to use. Possible values are c("matern", "pexp", "gaussian", "spherical", "cs", "gw", "tapmat").

nu

ν parameter. Not necessary if model is "gaussian" or "spherical"

tr

θ_r taper range.

kappa

κ \in \{0, …, 3 \} parameter for the GW cov function.

mu2

the smoothness parameter μ for the GW function.

apply_exp

a logical indicater wheter the exponential transformation should be applied to variance parameters. This facilitates the optimization process.

Details

Internal use.

Value

a scalar representing -log.lik.


smile documentation built on April 29, 2022, 9:05 a.m.