Skip to contents

This separate table leaves the ordinary repair_coefficients() contract intact. No conditional Wald statistics or p-values are assigned bootstrap meanings.

Usage

repair_bootstrap_coefficients(object, conf.level = 0.95, allow_failed = FALSE)

Arguments

object

A repair_bootstrap() result.

conf.level

Confidence level strictly between zero and one.

allow_failed

FALSE (default) withholds inference after any failed attempt. TRUE explicitly requests inference conditional on successful replicates.

Value

A plain data frame with columns term, estimate (original fit), std.error (bootstrap SD), conf.low, conf.high, conf.level, method (percentile), attempted, usable, failed, conditional_on_success, and inference (experimental label). Rows follow original coefficient order. All terms use the same complete usable vectors. At least two are required; this numerical minimum does not establish adequate precision or validity.

Examples

data(repair_example)
model <- lme4::lmer(score ~ day + (day | person), repair_example$repeated)
fit <- repair(re("day") ~ practice, model, repair_example$people, "person")
# Tiny B demonstrates the API, not adequate tail precision.
boot <- repair_bootstrap(fit, repair_example$repeated,
  repair_example$people, B = 3, seed = 41)
summary(boot)
#> REPAIR person bootstrap (experimental)
#> re("day") ~ practice 
#> People: 60 ; attempts: 3 ; usable: 3 ; failed: 0 
#>         term   estimate  std.error   conf.low  conf.high conf.level     method
#>  (Intercept) -0.7895289 0.17673487 -0.9561153 -0.6361082       0.95 percentile
#>     practice  0.1754854 0.02360676  0.1717858  0.2158065       0.95 percentile
#>  attempted usable failed conditional_on_success                     inference
#>          3      3      0                  FALSE Experimental person bootstrap
#>          3      3      0                  FALSE Experimental person bootstrap
#> Experimental person-level cases bootstrap; marginal percentile intervals; coverage not yet validated. 
#> Assess Monte Carlo stability before interpreting interval tails.
confint(boot, level = .90)
#>                    5 %       95 %
#> (Intercept) -0.9523322 -0.6491676
#> practice     0.1725522  0.2142561
#> attr(,"method")
#> [1] "percentile"
#> attr(,"attempted")
#> [1] 3
#> attr(,"usable")
#> [1] 3
#> attr(,"failed")
#> [1] 0
#> attr(,"conditional_on_success")
#> [1] FALSE
#> attr(,"inference")
#> [1] "Experimental person bootstrap"
repair_bootstrap_coefficients(boot, conf.level = .90)
#>          term   estimate  std.error   conf.low  conf.high conf.level     method
#> 1 (Intercept) -0.7895289 0.17673487 -0.9523322 -0.6491676        0.9 percentile
#> 2    practice  0.1754854 0.02360676  0.1725522  0.2142561        0.9 percentile
#>   attempted usable failed conditional_on_success                     inference
#> 1         3      3      0                  FALSE Experimental person bootstrap
#> 2         3      3      0                  FALSE Experimental person bootstrap
repair_bootstrap_diagnostics(boot)
#>   replicate usable    stage reason n_people n_measurement n_analyzed
#> 1         1   TRUE complete              60           592         60
#> 2         2   TRUE complete              60           580         60
#> 3         3   TRUE complete              60           609         60
#>   measurement_singular           controls preliminary_multiplier
#> 1                FALSE recorded_optimizer                   0.95
#> 2                FALSE recorded_optimizer                   0.95
#> 3                FALSE recorded_optimizer                   0.95
#>   final_multiplier preliminary_alpha final_alpha preliminary_criteria_met
#> 1             0.95                 3           3                       NA
#> 2             0.95                 3           3                       NA
#> 3             0.95                 3           3                       NA
#>   final_criteria_met preliminary_fallback final_fallback elapsed optimization
#> 1                 NA                   NA             NA   0.496             
#> 2                 NA                   NA             NA   0.470             
#> 3                 NA                   NA             NA   0.469             
#>   warnings messages
#> 1                  
#> 2                  
#> 3