cov_nnls function

Estimate non-negative diagonal terms on G matrix

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 )

Arguments

  • data: Data frame containing all predictor and outcome variables
  • L: The dimension of the functional domain
  • out_index: Indices of outcome variables in data
  • data_cov: (unsure) Covariance of variables
  • RE_table: Data frame containing random effects and interactions
  • idx_lst: (unsure) Column indices of random effects
  • designmat: (unsure)
  • betaHat: Estimates of coefficients of random effects
  • GTilde: Current GTilde estimate, created as an intermediate in G_estimate
  • non_neg: (unsure), defaults to 0
  • silent: Whether to print the step. Defaults to TRUE.

Returns

A matrix with the same dimensions as GTilde.

  • Maintainer: Erjia Cui
  • License: GPL (>= 3)
  • Last published: 2025-03-13