NR_gamma {MultiGlarmaVarSel} | R Documentation |
Newton-Raphson method for estimation of gamma
Description
This function estimates gamma with Newton-Raphson method
Usage
NR_gamma(Y, X, eta, gamma, I, J, n_iter = 100)
Arguments
Y |
Observation matrix |
X |
Design matrix |
eta |
Initial eta vector |
gamma |
Initial gamma vector |
I |
Number of conditions |
J |
Number of replications |
n_iter |
Number of iterations of the algorithm. Default=100 |
Value
Estimated gamma vector
Author(s)
Marina Gomtsyan
Maintainer: Marina Gomtsyan <marina.gomtsyan@agroparistech.fr>
References
M. Gomtsyan et al. "Variable selection in sparse multivariate GLARMA models: Application to germination control by environment", arXiv:2208.14721
Examples
data(Y)
I=3
J=100
T=dim(Y)[2]
q=1
X=matrix(0,nrow=(I*J),ncol=I)
for (i in 1:I)
{
X[((i-1)*J+1):(i*J),i]=rep(1,J)
}
gamma_0 = matrix(0, nrow = 1, ncol = q)
eta_glm_mat_0 = matrix(0,ncol=T,nrow=I)
for (t in 1:T)
{
result_glm_0 = glm(Y[,t]~X-1,family=poisson(link='log'))
eta_glm_mat_0[,t]=as.numeric(result_glm_0$coefficients)
}
eta_0 = round(as.numeric(t(eta_glm_mat_0)),digits=6)
gamma_est=NR_gamma(Y, X, eta_0, gamma_0, I, J, n_iter = 100)
[Package MultiGlarmaVarSel version 1.0 Index]