Estimate non-negative diagonal terms on G matrix
Helper function for G_estimate
. Uses least squares under non-negativity constraints, mainly relying on nnls
capability from lsei
.
cov_nnls( data, L, out_index, data_cov, RE_table, idx_lst, designmat, betaHat, GTilde, non_neg = 0, silent = TRUE )
data
: Data frame containing all predictor and outcome variablesL
: The dimension of the functional domainout_index
: Indices of outcome variables in data
data_cov
: (unsure) Covariance of variablesRE_table
: Data frame containing random effects and interactionsidx_lst
: (unsure) Column indices of random effectsdesignmat
: (unsure)betaHat
: Estimates of coefficients of random effectsGTilde
: Current GTilde
estimate, created as an intermediate in G_estimate
non_neg
: (unsure), defaults to 0silent
: Whether to print the step. Defaults to TRUE
.A matrix with the same dimensions as GTilde
.