calcObsTestStats: Calculate observed test statistics for model checking

View source: R/GcClusterFunctions.R

calcObsTestStatsR Documentation

Calculate observed test statistics for model checking

Description

Calculate test statistics for posterior predictive checking of the parameters in the finite mixture model. The test statistics pertain to the observed data that have undergone both the isometric log-ratio transform and the robust, principal component transform.

Usage

calcObsTestStats(transData, nPCs, condProbs1)

Arguments

transData

List containing the transformed geochemical concentrations and related information. This list is return by function transformGcData, for which the documentation includes a complete description of container transData.

nPCs

Number of principal components that were used in the finite mixture model.

condProbs1

A matrix containing the Monte Carlo samples of the conditional probabilites. This matrix is returned by function calcCondProbs1, for which the documentation includes a complete description of container condProbs1.

Details

Test statistics are defined in Gelman et al. (2014, p. 145) and are used for posterior predictive checking of the finite mixture model.

Value

A list with the following test quantities is returned.

mu1

Mean vector for pdf 1.

mu2

Mean vector for pdf 2.

tau1

Standard deviation vector for pdf 1.

tau2

Standard deviation vector for pdf 2.

Corr1

Correlation matrix for pdf 1.

Corr2

Correlation matrix for pdf 2.

References

Gelman, A., Carlin, J.B., Stern, H.S., Dunson, D.B., Vehtari, A., and Rubin, D.B., 2014, Bayesian data analysis (3rd ed.): CRC Press.

Examples

## Not run: 
obsTestStats <- calcObsTestStats(transData, nPCs, condProbs1)

## End(Not run)



USGS-R/GcClust documentation built on April 17, 2023, 8:08 p.m.