cov_mat function

Extract various sigma matrices

Extract various sigma matrices

cov_mat(obj, which = c("xy", "zy", "zw"), use_population = TRUE)

Arguments

  • obj: A simrel object
  • which: A character string to specify which covariance matrix to extract, possible values are "xy", "zy" and "zw"
  • use_population: A boolean whether to use compute population values or to estimate from sample

Returns

A matrix of covariances with column equals to the number of response and row equals to the number of predictors

Examples

set.seed(1983) sobj <- multisimrel() cov_mat(sobj, which = "xy", use_population = TRUE) cov_mat(sobj, which = "xy", use_population = FALSE)
  • Maintainer: Raju Rimal
  • License: GPL-3
  • Last published: 2021-09-17