Performs exact tests on specified coefficients of a linear model object using permutation tests to generate p-values and confidence intervals around the estimated coefficients. This function can handle both studentized and non-studentized test statistics, and allows the user to specify various parameters for the test.
exactt(
model,
data,
side = "both",
alpha = 0.05,
variables = NULL,
beta0 = NULL,
nBlocks = 5,
nPerms = NULL,
studentize = TRUE,
optimize = FALSE,
seed = 31740,
denominator = "GX1",
Q.X1 = NULL,
GX.indices = NULL,
root.tolerance = 1e-09,
...
)A formula specifying the model.
A data frame or matrix containing the variables used in the model.
A character to indicate the side of the test.
The significance level used for the hypothesis tests; defaults to 0.05.
Optional; a character vector of predictor names to test. If NULL, all predictors in the model are tested.
Optional; a numeric vector of null hypothesis values for the coefficients.
Must be the same length as variables if not NULL.
The number of blocks to use for block permutations.
Optional; the number of permutations to perform. If NULL or greater than the number of possible permutations, all permutations are used.
Logical indicating whether to use studentized residuals for the test.
Logical indicating whether to optimize the ordering of the data.
Seed used when optimizing using GA::ga(). Default is 31740.
Character argument indicating how to calculate epsilon hat.
Use custom QX1 value.
Indices for max rank GX. Used for warm start.
Tolerance for determining real and extraneous roots (when denominator = "X1" or "noX1").
Additional arguments passed to GA::ga() for optimizing power.
This can include parameters like popSize, maxiter, parallel, etc.,
that are used to configure the genetic algorithm. Note that when sample size is large
optimizing is computationally expensive and has little effect.
The p-value of the test that the null values of beta are 0.
The function divides the data into blocks specified by nBlocks and performs permutations
within across blocks to generate the null distribution of the test statistic. The user can
specify a set number of permutations with nPerms, or allow the function to calculate all
possible permutations if nPerms is unspecified or too large.
If studentize is TRUE, studentized residuals are used to adjust the test statistics,
potentially leading to more robust inference under model misspecification.
The function allows for a high degree of customization through its parameters and can handle large datasets and complex model structures efficiently.