Learn R Programming

cocons (version 0.1.5)

GetNeg2loglikelihood: GetNeg2loglikelihood

Description

compute the negative 2 log likelihood based on theta

Usage

GetNeg2loglikelihood(theta, par.pos, locs, x_covariates, 
smooth.limits, z, n, lambda, safe = TRUE)

Value

value

Arguments

theta

(numeric vector) a vector with parameters values.

par.pos

(list) par.pos list.

locs

(matrix) spatial location matrix.

x_covariates

(data.frame) design matrix.

smooth.limits

(numeric vector) smooth.limits.

z

(numeric vector) a vector of observed values.

n

(integer) dim(z)[1].

lambda

(numeric vector) a vector including lambda.Sigma, lambda.betas, lambda.reg (in this order)

safe

(TRUE/FALSE) if TRUE returns a large pre-defined value under Cholesky errors. Default TRUE.

Author

Federico Blasi