approx_mult_prod: Approximate the covariance of a set of predictors and a...

View source: R/multiplication_estimation.R

approx_mult_prodR 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

\insertRef

wolf_using_2021pcsstools


jackmwolf/pcsstools documentation built on July 7, 2024, 7:46 p.m.