Learn R Programming

Rdistance (version 4.1.1)

varcovarEstim: Estimate variance-covariance

Description

Estimate the variance-covariance matrix of parameters in the distance function. If the likelihood is differentiable, the variance-covariance matrix is estimated from the second derivative of the likelihood (i.e., the hessian). If the likelihood is not differentiable, the variance-covariance matrix is a matrix of 0's that are interpreted as "pending" (i.e., pending bootstrapping).

Usage

varcovarEstim(x, ml)

Value

A square symmetric matrix estimating the variance-covariance matrix of parameters in x. Dimension of return is p X p, where p = length(x$par).

Arguments

x

An estimated detection function object, normally produced by calling dfuncEstim.

ml

Either a Rdistance 'model frame' or an Rdistance 'fitted object'. Both are of class "dfunc". Rdistance 'model frames' are lists containing components necessary to estimate a distance function, but no estimates. Rdistance 'model frames' are typically produced by calls to parseModel. Rdistance 'fitted objects' are typically produced by calls to dfuncEstim. 'Fitted objects' are 'model frames' with additional components such as the parameters estimates, log likelihood value, convergence information, and the variance- covariance matrix of the parameters.