Skip to contents

Assemble readable tables without refitting or changing the estimator.

Usage

repair_diagnostics(object, table = NULL)

Arguments

object

A fitted repair() result, including a numerical failure.

table

Optional exact table name: "status", "scope", "excluded", "mlm", "prediction_failures", "prediction_error_variances", "regularization", "conditioning", "weights", "weight_summary", or "reliability". Default NULL returns the existing list. A table name returns a plain data frame with automatic row names, including typed zero-row tables on failure. Reliability is computed only for NULL or "reliability". The cross-model covariance policy is metadata in the list, not a selectable table.

Value

With table = NULL, a list with data frames status, scope, excluded, mlm, prediction_failures, prediction_error_variances, regularization, conditioning, weights, weight_summary, and reliability. Reliability uses the analyzed scope and the definitions in repair_reliability(). cross_model_error records the covariance policy and original supplied blocks.

Details

Error variances describe likelihood-only predictions on the structural input scale; they are not posterior variances. Observed variables have zero error under the model's assumptions. Weight fractions are normalized inverse case-variance weights. weight_equivalent_n = 1 / sum(fraction^2) describes concentration only: it is not an inferential sample size or degrees of freedom.

Conditioning uses eigenvalues of the preliminary and final corrected predictor moments, including the error-free structural intercept. The reported spectral condition number depends on variable units; no automatic cutoff is applied. A nonpositive minimum eigenvalue yields an infinite condition number. The subtraction multiplier equals one for full measurement-error subtraction; it is not a measure of the amount of measurement error. regularized indicates that the multiplier differs from one beyond numerical tolerance (1e-8).

Prediction extraction failures include failures outside the structural scope and identify their MLM and inclusion status. Exclusions retain all reasons. On numerical structural failure, MLM diagnostics remain available, while unavailable structural tables have zero rows and status records why.

Examples

data(repair_example)
growth <- lme4::lmer(score ~ day + (day | person), repair_example$repeated)
fit <- repair(re("day") ~ practice, growth, repair_example$people, "person")
repair_diagnostics(fit, table = "scope")
#>   n_requested n_analyzed n_excluded
#> 1          60         60          0
repair_diagnostics(fit, table = "weight_summary")
#>   n_units max_fraction weight_equivalent_n
#> 1      60   0.01788085            59.82168
repair_diagnostics(fit, table = "excluded")
#> [1] id     reason
#> <0 rows> (or 0-length row.names)