Skip to contents

Produces a status-aware summary from validated canonical fields, including candidate availability, Gamma parameters, target-versus-achieved evidence, and any attached diagnostics.

Usage

# S3 method for class 'DPprior_fit'
summary(object, print_output = TRUE, ...)

Arguments

object

A DPprior_fit object.

print_output

Logical; if TRUE (default), prints the summary to the console. If FALSE, returns the summary list silently.

...

Additional arguments (currently unused).

Value

An object of class "summary.DPprior_fit" containing:

  • schema, mode, method, status, usable, and verified;

  • candidate_available, gamma_prior, and derived alpha_summary;

  • canonical target, achieved, weight, and errors views;

  • message, guidance, iterations, and attached diagnostics.

Details

The complete input is schema-validated before summarization. A migrated result without a public candidate remains visibly unavailable; quarantined compatibility evidence is not promoted into the summary.

Examples

# Create a fit object
fit <- DPprior_fit(J = 50, mu_K = 5, var_K = 8, check_diagnostics = TRUE)
summary(fit)
#> DPprior Prior Elicitation Summary
#> ============================================================ 
#> 
#> Schema: dpprior.result/1
#> Sample size: J = 50
#> Method: A2-MN (mode: a2_moment)
#> Status: converged; usable: yes; verified: yes
#> 
#> Canonical K_J target:
#> ---------------------------------------- 
#>   Requested E[K_J] = 5.0000
#>   Var(K_J) = 8.0000
#> 
#> Canonical candidate:
#> ---------------------------------------- 
#>   Gamma(a = 2.036093, b = 1.605054)
#>   E[alpha] = 1.2686; SD[alpha] = 0.8890; CV[alpha] = 0.7008
#>   Achieved E[K_J] = 5.0000; Var(K_J) = 8.0000
#>   Absolute errors: mean 1.163e-12; variance 1.894e-12
#> 
#> Canonical guidance: scaled component residuals and independent higher-order verification passed

# Store summary without printing
summ <- summary(fit, print_output = FALSE)
str(summ)
#> List of 23
#>  $ schema             : chr "dpprior.result/1"
#>  $ canonical          : logi TRUE
#>  $ migrated           : logi FALSE
#>  $ mode               : chr "a2_moment"
#>  $ method             : chr "A2-MN"
#>  $ status             : chr "converged"
#>  $ usable             : logi TRUE
#>  $ verified           : logi TRUE
#>  $ message            : chr "scaled component residuals and independent higher-order verification passed"
#>  $ guidance           : chr "scaled component residuals and independent higher-order verification passed"
#>  $ candidate_available: logi TRUE
#>  $ gamma_prior        :List of 2
#>   ..$ a: num 2.04
#>   ..$ b: num 1.61
#>  $ alpha_summary      :List of 4
#>   ..$ E_alpha  : num 1.27
#>   ..$ Var_alpha: num 0.79
#>   ..$ SD_alpha : num 0.889
#>   ..$ CV_alpha : num 0.701
#>  $ target             :List of 4
#>   ..$ mu_K      : num 5
#>   ..$ var_K     : num 8
#>   ..$ var_K_used: num 8
#>   ..$ confidence: chr NA
#>  $ achieved           :List of 3
#>   ..$ mu_K    : num 5
#>   ..$ var_K   : num 8
#>   ..$ residual: num 1.89e-12
#>  $ weight             :List of 4
#>   ..$ metric  : chr NA
#>   ..$ estimand: chr NA
#>   ..$ target  : num NA
#>   ..$ achieved: num NA
#>  $ errors             :List of 4
#>   ..$ mu_K_abs     : num 1.16e-12
#>   ..$ var_K_abs    : num 1.89e-12
#>   ..$ mu_K_rel_pct : num 2.33e-11
#>   ..$ var_K_rel_pct: num 2.37e-11
#>  $ scaling            :List of 1
#>   ..$ J: int 50
#>  $ converged          : logi TRUE
#>  $ iterations         : int 6
#>  $ diagnostics        :List of 7
#>   ..$ authority     :List of 9
#>   .. ..$ method                 : chr "fresh_component_specific_diagnostics"
#>   .. ..$ M_selected             : int 80
#>   .. ..$ M_verification_required: int 160
#>   .. ..$ M_verification_used    : int 160
#>   .. ..$ absolute_tolerance     : num 1e-10
#>   .. ..$ relative_tolerance     : num 1e-08
#>   .. ..$ pmf_mass_tolerance     : num 1e-10
#>   .. ..$ warning_policy         : NULL
#>   .. ..$ allow_approximate      : logi FALSE
#>   ..$ policy_results: list()
#>   ..$ warnings      : chr(0) 
#>   ..$ alpha         :List of 5
#>   .. ..$ status  : chr "converged"
#>   .. ..$ usable  : logi TRUE
#>   .. ..$ verified: logi TRUE
#>   .. ..$ mean    : num 1.27
#>   .. ..$ CV      : num 0.701
#>   ..$ K             :List of 7
#>   .. ..$ status  : chr "converged"
#>   .. ..$ usable  : logi TRUE
#>   .. ..$ verified: logi TRUE
#>   .. ..$ mean    : num 5
#>   .. ..$ variance: num 8
#>   .. ..$ pmf     : num [1:50] 0.0746 0.1247 0.1473 0.1472 0.132 ...
#>   .. ..$ M       : int 80
#>   ..$ weights       :List of 4
#>   .. ..$ status  : chr "converged"
#>   .. ..$ usable  : logi TRUE
#>   .. ..$ verified: logi TRUE
#>   .. ..$ mean    : num 0.501
#>   ..$ coclustering  :List of 5
#>   .. ..$ status  : chr "converged"
#>   .. ..$ usable  : logi TRUE
#>   .. ..$ verified: logi TRUE
#>   .. ..$ mean    : num 0.501
#>   .. ..$ variance: num 0.065
#>  $ trace              : NULL
#>  $ dual_anchor        : NULL
#>  - attr(*, "class")= chr "summary.DPprior_fit"