| ppi_robust {scorematchingad} | R Documentation |
Robustly Estimate Parameters of the PPI Distribution
Description
ppi_robust() uses Windham() and ppi() to estimate a PPI distribution robustly.
There are many arguments to the ppi() function and we highly recommend testing your arguments on ppi() first before running ppi_robust().
ppi_robust_alrgengamma() performs the Windham robustification algorithm exactly as described in Scealy et al. (2024) for score matching via log-ratio transform of the PPI model with b_L = 0. This function calls the more general Windham() and ppi().
Usage
ppi_robust(Y, cW, ...)
ppi_robust_alrgengamma(
Y,
cW,
...,
fpcontrol = list(Method = "Simple", ConvergenceMetricThreshold = 1e-10)
)
Arguments
Y |
A matrix of measurements. Each row is a measurement, each component is a dimension of the measurement. |
cW |
A vector of robustness tuning constants. Easy to build using |
... |
|
fpcontrol |
A named list of control arguments to pass to |
Details
ppi_robust_alrgengamma(): must fit a PPI model via additive-log ratio transform of the simplex with b_L=0 fixed and the final element of \beta fixed.
The default convergence metric and threshold are different to the default for ppi_robust() to match the implementation in (Scealy et al. 2024): convergence is measured by the change in the first element of \beta, and convergence is reached when the change is smaller than 1E-6. Override this behaviour by specifying the elements ConvergenceMetric and ConvergenceMetricThreshold in a list passed as fpcontrol.
Windham() is called with alternative_populationinverse = TRUE.
Value
A list:
-
estThe estimated parameters in vector form (paramvec) and asAL,bLandbeta. -
SE"Not calculated." Returned for consistency with other estimators. -
infoInformation returned in theoptimslot ofWindham(). Includes the final weights infinalweights.
References
Scealy JL, Hingee KL, Kent JT, Wood ATA (2024). “Robust score matching for compositional data.” Statistics and Computing, 34, 93. doi:10.1007/s11222-024-10412-w.
See Also
Other PPI model tools:
dppi(),
ppi_param_tools,
ppi(),
rppi()
Other Windham robustness functions:
Windham(),
vMF_robust()
Examples
set.seed(7)
model <- rppi_egmodel(100)
estsqrt <- ppi_robust(model$sample,
cW = ppi_cW_auto(0.01, model$sample),
paramvec_start = model$theta,
trans = "sqrt", bdryw = "minsq", acut = 0.1)
set.seed(14)
model <- rppi_egmodel(100)
ppi_robust_alrgengamma(model$sample,
cW = ppi_cW_auto(0.01, model$sample),
paramvec = ppi_paramvec(betap = -0.5, p = ncol(model$sample)))