Learn R Programming

fastFMM (version 0.3.0)

cov_nnls: Estimate non-negative diagonal terms on G matrix

Description

Helper function for `G_estimate`. Uses least squares under non-negativity constraints, mainly relying on `nnls` capability from `lsei`.

Usage

cov_nnls(
  data,
  L,
  out_index,
  data_cov,
  RE_table,
  idx_lst,
  designmat,
  betaHat,
  GTilde,
  non_neg = 0,
  silent = TRUE
)

Value

A matrix with the same dimensions as `GTilde`.

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`.