cov_nnls {fastFMM}R Documentation

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
)

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

Value

A matrix with the same dimensions as 'GTilde'.


[Package fastFMM version 0.4.0 Index]