Used for gradient of eta. Currently being passed to optim in
lmmlasso
and used in kkt_check
gr_eta_lasso_fullrank(eta, sigma2, beta, eigenvalues, x, y, nt)fn_eta_lasso_fullrank(eta, sigma2, beta, eigenvalues, x, y, nt)
current estimate of the eta parameter
current estimate of the sigma2 parameter
current estimate of the beta parameter including the intercept. this should be of length p+1, where p is the number of variables.
non-zero eigenvalues of the kinship matrix, or the square of the singular values of the matrix used to construct the kinship matrix
input matrix, of dimension n x p; where n is the number of observations and p are the number of predictors.
response variable. must be a quantitative variable
total number of observations
returns the value of the function and gradient for the eta variance parameter