bootstrap_fbar_sample {npboottprmFBar}R Documentation

Internal Bootstrap Resampling for F-bar Test

Description

This internal function performs bootstrap resampling specific to the F-bar test within the context of the nonparametric bootstrap test with pooled resampling. It is used by bootFbar to generate bootstrap samples and compute intermediate statistics.

Usage

bootstrap_fbar_sample(
  data,
  formula,
  grp,
  constraints,
  grp_val,
  grp_sizes,
  pre_calc,
  only_equality_constraints
)

Arguments

data

A data frame containing the dataset for analysis.

formula

An object of class "formula": a symbolic description of the model to be fitted.

grp

A string specifying the grouping variable in the data.

constraints

A matrix or data frame of constraints for the hypothesis test.

grp_val

A vector containing the values of the group variable.

grp_sizes

A table object containing the sizes of each group.

pre_calc

A list containing pre-calculated original test statistics.

only_equality_constraints

A logical indicating whether only equality constraints are used.

Details

The function creates bootstrap samples for each group in the data, then binds these samples together. It applies the restriktor::iht function on these samples to compute the test statistics. Error handling is implemented to manage potential issues in iht computation.

Value

A list containing the test statistics for each constraint type (B, A, F) based on the bootstrap sample. Returns NA values if the iht computation fails.


[Package npboottprmFBar version 0.2.0 Index]