grad_hess_gamma function

Gradient and Hessian of the log-likelihood with respect to gamma

Gradient and Hessian of the log-likelihood with respect to gamma

This function calculates the gradient and Hessian of the log-likelihood with respect to gamma

grad_hess_gamma(Y, X, beta0, gamma0)

Arguments

  • Y: Observation matrix
  • X: Design matrix
  • beta0: Initial beta vector
  • gamma0: Initial gamma vector

Returns

  • grad_L_gamma: Vector of the gradient of L with respect to gamma

  • hess_L_gamma: Matrix of the Hessian of L with respect to gamma

References

M. Gomtsyan et al. "Variable selection in sparse GLARMA models", arXiv:2007.08623v1

Author(s)

Marina Gomtsyan, Celine Levy-Leduc, Sarah Ouadah, Laure Sansonnet

Maintainer: Marina Gomtsyan marina.gomtsyan@agroparistech.fr

Examples

n=50 p=30 X = matrix(NA,(p+1),n) f = 1/0.7 for(t in 1:n){X[,t]<-c(1,cos(2*pi*(1:(p/2))*t*f/n),sin(2*pi*(1:(p/2))*t*f/n))} gamma0 = c(0) data(Y) glm_pois<-glm(Y~t(X)[,2:(p+1)],family = poisson) beta0<-as.numeric(glm_pois$coefficients) result = grad_hess_gamma(Y, X, beta0, gamma0) grad = result$grad_L_gamma Hessian = result$hess_L_gamma
  • Maintainer: Marina Gomtsyan
  • License: GPL-2
  • Last published: 2021-09-16

Useful links