CompLik: Optimizes the Composite Log-likelihood

View source: R/GeoCompositeLik.r

CompLikR Documentation

Optimizes the Composite Log-likelihood

Description

Subroutine called by GeoFit. The procedure estimates the model parameters by maximization of the composite log-likelihood.

Usage

CompLik(copula, bivariate, coordx, coordy, coordz, coordt, 
        coordx_dyn, corrmodel, data, distance, flagcorr, 
        flagnuis, fixed, GPU, grid, likelihood, local, lower, 
        model, n, namescorr, namesnuis, namesparam,
        numparam, numparamcorr, optimizer, 
        onlyvar, parallel, param,
        spacetime, type, upper, varest,
        weigthed, ns, X, sensitivity, MM, aniso)

Arguments

copula

String; the type of copula. It can be "Clayton" or "Gaussian".

bivariate

Logical; if TRUE then the data come from a bivariate random field, otherwise from a univariate random field.

coordx

A numeric d \times 2 or d \times 3 matrix. Coordinates on a sphere for a fixed radius radius are passed in lon/lat format expressed in decimal degrees.

coordy

A numeric vector giving one dimension of spatial coordinates; optional, default is NULL.

coordz

A numeric vector giving one dimension of spatial coordinates; optional, default is NULL.

coordt

A numeric vector giving one dimension of temporal coordinates; optional, default is NULL (in which case a spatial random field is assumed).

coordx_dyn

A list of m numeric d_t \times 2 matrices containing dynamic (in time) spatial coordinates; optional, default is NULL.

corrmodel

Numeric; the ID of the correlation model.

data

A numeric vector, or a n \times d matrix, or a d \times d \times n array of observations.

distance

String; the name of the spatial distance. Default is "Eucl" (Euclidean distance). See Details.

flagcorr

Numeric vector of binary values indicating which parameters of the correlation function will be estimated.

flagnuis

Numeric vector of binary values indicating which nuisance parameters will be estimated.

fixed

Numeric vector of parameters considered as known values.

GPU

Numeric; if NULL (default), no GPU computation is performed.

grid

Logical; if FALSE (default), data are interpreted as vector or n \times d matrix; if TRUE, then a d \times d \times n array is considered.

likelihood

String; configuration of the composite likelihood (see GeoFit).

local

Numeric; number of local work-items of the GPU.

lower

Named list; optional lower bounds for parameters when using optimizers L-BFGS-B, nlminb, or optimize. Names must match those in the start list.

model

Numeric; ID of the density associated with the likelihood objects.

n

Numeric; number of trials in binomial random fields.

namescorr

Character vector; names of the correlation parameters.

namesnuis

Character vector; names of the nuisance parameters.

namesparam

Character vector; names of the parameters to be maximized.

numparam

Numeric; number of parameters to be maximized.

numparamcorr

Numeric; number of correlation parameters.

optimizer

String; optimization algorithm (see optim). Default is "Nelder-Mead". Other options: "nlm", "BFGS", "L-BFGS-B", "nlminb". For "L-BFGS-B" and "nlminb" bounds can be provided. For 1D optimization, optimize is used.

onlyvar

Logical; if TRUE (and varest is TRUE), only the variance-covariance matrix is computed without optimizing. Default is FALSE.

parallel

Logical; if TRUE, optimization uses optimParallel with maximum cores, when optimizer is "L-BFGS-B". Default is FALSE.

param

Numeric vector of parameter values.

spacetime

Logical; if TRUE, the random field is spatio-temporal, otherwise spatial.

type

String; type of likelihood object. Default is "Pairwise" (marginal composite likelihood formed by pairwise marginal likelihoods).

upper

Named list; optional upper bounds for parameters when using optimizers L-BFGS-B, nlminb, or optimize. Names must match those in the start list.

varest

Logical; if TRUE, variance estimates and standard errors are returned. Default is FALSE.

weigthed

Logical; if TRUE, decreasing weights from a compactly supported correlation function with compact support maxdist (maxtime) are used.

ns

Numeric; number of (dynamic) temporal instants.

X

Numeric; matrix of space-time covariates in the linear mean specification.

sensitivity

Logical; if TRUE, the sensitivity matrix is computed.

MM

Numeric; a non-constant fixed mean.

aniso

Logical; whether anisotropy should be considered.

Details

Subroutine called by GeoFit. The procedure estimates model parameters by maximization of the composite log-likelihood.

Value

Returns a list from an optim call.

Author(s)

Moreno Bevilacqua, moreno.bevilacqua89@gmail.com, https://sites.google.com/view/moreno-bevilacqua/home,
Víctor Morales Oñate, victor.morales@uv.cl, https://sites.google.com/site/moralesonatevictor/,
Christian Caamaño-Carrillo, chcaaman@ubiobio.cl, https://www.researchgate.net/profile/Christian-Caamano

See Also

GeoFit


GeoModels documentation built on June 25, 2025, 5:10 p.m.

Related to CompLik in GeoModels...