singl_log_plik: Evaluate log-lik

View source: R/log-lik.R

singl_log_plikR Documentation

Evaluate log-lik

Description

Evaluate the log-likelihood for a given set of parameters - New parametrization + profile likelihood

Usage

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

Arguments

theta

a vector of size 2 containing the parameters associated with the model. These parameters are \nu and \phi, respectively.

.dt

a numeric vector containing the variable Y.

dists

a list of size three. The first containing the distance matrices associated with the regions where Y was measured, the second for the distance matrices associated with X, and the last containing the cross-distance matrices.

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

\nu parameter. Not necessary if mode is "gaussian" or "spherical"

tr

\theta_r taper range.

kappa

\kappa \in \{0, \ldots, 3 \} parameter for the GW cov function.

mu2

the smoothness parameter \mu for the GW function.

apply_exp

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

Details

Internal use.

Value

a scalar representing -log.lik.


lcgodoy/smile documentation built on Nov. 20, 2024, 12:17 a.m.