Skip to contents

Cluster-robust Wald test for MARS coefficients

Usage

robust_wald(
  object,
  constraints,
  null = 0,
  test = c("HTZ", "Naive-F", "chi-square")
)

Arguments

object

A fitted mars object containing robust inference information.

constraints

A constraint matrix, coefficient names, or coefficient indices.

null

Numeric null values.

test

One of "HTZ", "Naive-F", or "chi-square".

Examples

fit <- mars(school, studyID = "study", formula = effect ~ year,
            variance = "var", varcov_type = "univariate", structure = "univariate",
            estimation_method = "MLE", robustID = "district")
robust_wald(fit, constraints = 2)
#>   test statistic df_num df_denom p_value
#> 1  HTZ 0.3225797      1  3.28649 0.60657