Skip to contents

Returns a one-row, status-aware public view of a canonical dpprior.result/1 fit. The method validates the complete object before extracting any value; it never repairs a result or reads unregistered flat fields as scientific evidence.

Usage

# S3 method for class 'DPprior_fit'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)

Arguments

x

A canonical DPprior_fit object.

row.names

Optional row names.

optional

Retained for the data-frame S3 signature; it does not alter the canonical column contract.

...

Additional arguments, currently unused.

Value

A one-row data frame containing schema, mode, method, status, usable, verified, candidate availability, Gamma parameters, canonical target and achieved K moments, any named weight target evidence, and status guidance. Parameter columns are NA when the canonical result has no public candidate.

Examples

fit <- DPprior_fit(
  J = 50, mu_K = 5, var_K = 8, check_diagnostics = FALSE
)
as.data.frame(fit)
#>             schema migrated      mode method    status usable verified
#> 1 dpprior.result/1    FALSE a2_moment  A2-MN converged   TRUE     TRUE
#>   candidate_available        a        b  J mu_K var_K achieved_mu_K
#> 1                TRUE 2.036093 1.605054 50    5     8             5
#>   achieved_var_K weight_metric weight_target_value weight_achieved_value
#> 1              8          <NA>                  NA                    NA
#>   mean_alpha  cv_alpha scaling converged iterations
#> 1   1.268551 0.7008115    <NA>      TRUE          6
#>                                                                       message
#> 1 scaled component residuals and independent higher-order verification passed
#>                                                                      guidance
#> 1 scaled component residuals and independent higher-order verification passed