approx_mult_prod {pcsstools}R Documentation

Approximate the covariance of a set of predictors and a product of responses

Description

approx_mult_prod recursively estimates the covariances and means of a set of responses. Estimates are approximated using all unique response orderings and aggregated.

Usage

approx_mult_prod(
  means,
  covs,
  n,
  response,
  predictors,
  responses,
  verbose = FALSE
)

Arguments

means

a vector of predictor and response means with all response means at the end of the vector.

covs

covariance matrix of all predictors and responses with column and row order corresponding to the order of means.

n

sample size (an integer).

response

a string. Currently supports "binary" or "continuous".

predictors, responses

lists of objects of class predictor where each entry corresponds to one predictor/response variable.

verbose

logical.

Value

A list containing the following elements:

means

a vector of the (approximated) means of all predictors and the product of responses

covs

a matrix of (approximated) covariances between all predictors and the product of responses

References

Wolf JM, Westra J, Tintle N (2021). “Using Summary Statistics to Model Multiplicative Combinations of Initially Analyzed Phenotypes With a Flexible Choice of Covariates.” Frontiers in Genetics, 12, 1962. ISSN 1664-8021, doi:10.3389/fgene.2021.745901, https://www.frontiersin.org/articles/10.3389/fgene.2021.745901/full.


[Package pcsstools version 0.1.2 Index]