CompLik2 {GeoModels}R Documentation

Optimizes the Composite log-likelihood

Description

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

Usage

CompLik2(copula,bivariate, coordx, coordy ,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, vartype, weigthed, winconst, 
         winstp,winconst_t, winstp_t, ns, X,sensitivity,
         colidx,rowidx,neighb,MM,aniso)

Arguments

copula

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

bivariate

Logical; if TRUE then the data come froma a bivariate random field. Otherwise from a univariate random field.

coordx

A numeric (d \times 2)-matrix (where d is the number of points) assigning 2-dimensions of coordinates or a numeric vector assigning 1-dimension of coordinates.

coordy

A numeric vector assigning 1-dimension of coordinates; coordy is interpreted only if coordx is a numeric vector otherwise it will be ignored.

coordt

A numeric vector assigning 1-dimension of temporal coordinates. Optional argument, the default is NULL then a spatial random field is expected.

coordx_dyn

A list of m numeric (d_t \times 2)-matrices containing dynamical (in time) spatial coordinates. Optional argument, the default is NULL

corrmodel

Numeric; the id of the correlation model.

data

A numeric vector or a (n \times d)-matrix or (d \times d \times n)-matrix of observations.

distance

String; the name of the spatial distance. The default is Eucl, the euclidean distance. See the Section Details.

flagcorr

A numeric vector of binary values denoting which paramerters of the correlation function will be estimated.

flagnuis

A numeric vector of binary values denoting which nuisance paramerters will be estimated.

fixed

A numeric vector of parameters that will be considered as known values.

GPU

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

grid

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

likelihood

String; the configuration of the compositelikelihood, see GeoFit.

local

Numeric; number of local work-items of the GPU

lower

An optional named list giving the values for the lower bound of the space parameter when the optimizer is L-BFGS-B or nlminb or optimize. The names of the list must be the same of the names in the start list.

model

Numeric; the id value of the density associated to the likelihood objects.

n

Numeric; number of trials in a binomial random fields.

namescorr

String; the names of the correlation parameters.

namesnuis

String; the names of the nuisance parameters.

namesparam

String; the names of the parameters to be maximised.

numparam

Numeric; the number of parameters to be maximised.

numparamcorr

Numeric; the number of correlation parameters.

optimizer

String; the optimization algorithm (see optim for details). Nelder-Mead is the default. Other possible choices are nlm, BFGS L-BFGS-B and nlminb. In these last two cases upper and lower bounds can be passed by the user. In the case of one-dimensional optimization, the function optimize is used.

onlyvar

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

parallel

Logical; if TRUE optmization is performed using optimParallel using the maximum number of cores, when optimizer is L-BFGS-B.FALSE is the default.

param

A numeric vector of parameters' values.

spacetime

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

type

String; the type of the likelihood objects. If Pairwise (the default) then the marginal composite likelihood is formed by pairwise marginal likelihoods.

upper

An optional named list giving the values for the upper bound of the space parameter when the optimizer is or L-BFGS-B or nlminb or optimize. The names of the list must be the same of the names in the start list.

varest

Logical; if TRUE the estimate' variances and standard errors are returned. FALSE is the default.

vartype

String; the type of estimation method for computing the estimate variances, see GeoFit.

weigthed

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

winconst

Numeric; a positive value for computing the spatial sub-window in the sub-sampling procedure.

winstp

Numeric; a value in (0,1] for defining the the proportion of overlapping in the spatial sub-sampling procedure.

winconst_t

Numeric; a positive value for computing the temporal sub-window in the sub-sampling procedure.

winstp_t

Numeric; a value in (0,1] for defining the the proportion of overlapping in the temporal sub-sampling procedure.

ns

Numeric; Number of (dynamical) temporal instants.

X

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

sensitivity

Logical; if TRUE then the sensitivy matrix is computed

colidx

Numeric; Vector of indexes for spatial distances.

rowidx

Numeric; Vector of indexes for spatial distances.

neighb

Numeric; an optional positive integer indicating the order of neighborhood location.

MM

Numeric;a non constant fixed mean

aniso

Logical; should anisotropy be considered?

Value

Return 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


[Package GeoModels version 2.0.4 Index]