ppi_robust: Robustly Estimate Parameters of the PPI Distribution

View source: R/ppi_robust.R

ppi_robustR 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 \insertCitescealy2024ro;textualscorematchingad 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 ppi_cW() and ppi_cW_auto(). See Windham() for more details on cW.

...

Passed to Windham() and on to ppi().

fpcontrol

A named list of control arguments to pass to FixedPoint::FixedPoint() for the fixed point iteration.

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 \insertCitescealy2024roscorematchingad: 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:

  • est The estimated parameters in vector form (paramvec) and as AL, bL and beta.

  • SE "Not calculated." Returned for consistency with other estimators.

  • info Information returned in the optim slot of Windham(). Includes the final weights in finalweights.

References

\insertAllCited

See Also

Other PPI model tools: dppi(), ppi(), ppi_param_tools, 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)))

scorematchingad documentation built on April 4, 2025, 12:15 a.m.