The Wald test is a general test for the null hypothesis that a parameter vector is equal to a specified value. The test statistic is the square of the difference between the estimated parameter and the hypothesized value, divided by the estimated variance of the parameter. The p-value is the probability of observing a test statistic as extreme as the one observed under the null hypothesis.

wald_test(estimate, se, null_value = 0)

Arguments

estimate

the estimated parameter value

se

the standard error of the parameter estimate

null_value

the hypothesized parameter value

Value

Wald test

Examples

# create a Wald test
wald <- wald_test(estimate = 1, null_value = 0, se = 0.5)
# print the test
test_stat(wald)
#> [1] 4
pval(wald)
#> [1] 6.334248e-05
dof(wald)
#> [1] 1
# check if the test is significant at the 5% level
is_significant_at(wald, 0.05)
#> [1] TRUE