estimateWhiteningMatrix: Estimate the Whitening matrix to be used in the "wBSL" method...

Description Usage Arguments Value References Examples

View source: R/estimateWhiteningMatrix.R

Description

This function estimates the Whitening matrix to be used in BSL with Warton's shrinkage and Whitening (“wBSL” method of \insertCitePriddle2019;textualBSL). The Whitening transformation and decorrelation methods are detailed in \insertCiteKessy2018;textualBSL.

Usage

1
2
3
4
5
6
7
8
estimateWhiteningMatrix(
  n,
  model,
  method = c("PCA", "ZCA", "Cholesky", "ZCA-cor", "PCA-cor"),
  thetaPoint = NULL,
  parallel = FALSE,
  parallelArgs = NULL
)

Arguments

n

The number of model simulations to estimate the Whitening matrix.

model

A “MODEL” object generated with function newModel. See newModel.

method

The type of Whitening method to be used. The default is “PCA”.

thetaPoint

A point estimate of the parameter value with non-negligible posterior support.

parallel

A logical value indicating whether parallel computing should be used for simulation and summary statistic evaluation. The default is FALSE. When model simulation is fast, it may be preferable to perform serial or vectorised computations to avoid significant communication overhead between workers. Parallel computation can only be used if not using a vectorised simulation function, see MODEL for options of vectorised simulation function.

parallelArgs

A list of additional arguments to pass into the foreach function. Only used when parallel computing is enabled, default is NULL.

Value

The estimated Whitening matrix.

References

\insertAllCited

Examples

1
2
3
4
5
6
## Not run: 
data(ma2)
model <- newModel(fnSim = ma2_sim, fnSum = ma2_sum, simArgs = ma2$sim_args, theta0 = ma2$start)
W <- estimateWhiteningMatrix(20000, model, method = "PCA", thetaPoint = c(0.6, 0.2))

## End(Not run)

ziwenan/BSL documentation built on April 25, 2021, 1:11 p.m.