VARbeta.fun {NHPoisson}R Documentation

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)

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.

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'.

Note

The function fitPP.fun calls this function.

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.

See Also

CItran.fun, CIdelta.fun

Examples


lambdafit<-runif(100,0,1)
X<-cbind(rep(1,100),rnorm(100),rnorm(100))

aux<-VARbeta.fun(covariates=X, lambdafit=lambdafit)



[Package NHPoisson version 3.3 Index]