VARbeta.fun: Calculate the covariance matrix of the \(\hat \beta\) vector.
Description
This function estimates the covariance matrix of the ML estimators of the
\(\beta\) parameters, using the asymptotic distribution and properties of the ML estimators.
Usage
VARbeta.fun(covariates, lambdafit)
Value
VARbeta
Coariance matrix of the \(\hat \beta\) vector. It has
an attribute, called 'CalMethod' which shows the method used to calculate the inverse of the matrix:
'Solve function', 'Cholesky' or 'Not possible'.
Arguments
covariates
Matrix of covariates (each column is a covariate).
lambdafit
Numeric vector, the fitted PP intensity \(\hat \lambda(t)\).
Details
The covariance matrix is calculated as the inverse of the negative of the hessian matrix. The inverse of the matrix
is calculated using the solve function. If this function leads to an error in the calculation, the
inverse is calculated via its Cholesky decomposition. If this option also fails,
the covariance matrix is not estimated and a matrix of dimension \(0 \times 0\) is returned.
References
Casella, G. and Berger, R.L., (2002). Statistical inference. Brooks/Cole.
Cebrian, A.C., Abaurrea, J. and Asin, J. (2015). NHPoisson: An R Package for
Fitting and Validating Nonhomogeneous Poisson Processes.
Journal of Statistical Software, 64(6), 1-24.