VARbeta.fun: Calculate the covariance matrix of the \hat beta vector.

Description Usage Arguments Details Value Note References See Also Examples

View source: R/VARbeta.fun.r

Description

This function estimates the covariance matrix of the ML estimators of the β parameters, using the asymptotic distribution and properties of the ML estimators.

Usage

1
VARbeta.fun(covariates, lambdafit)

Arguments

covariates

Matrix of covariates (each column is a covariate).

lambdafit

Numeric vector, the fitted PP intensity \hat λ(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 β 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

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

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

NHPoisson documentation built on Feb. 19, 2020, 5:07 p.m.