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
)
A matrix with the same dimensions as `GTilde`.
Data frame containing all predictor and outcome variables
The dimension of the functional domain
Indices of outcome variables in `data`
(unsure) Covariance of variables
Data frame containing random effects and interactions
(unsure) Column indices of random effects
(unsure)
Estimates of coefficients of random effects
Current `GTilde` estimate, created as an intermediate in `G_estimate`
(unsure), defaults to 0
Whether to print the step. Defaults to `TRUE`.