Calculates the square root of the Wald test statistic for a single parameter.
sqrt_wald_test(thetahat, sehat, null = 0, dist = "z", df)
| thetahat | Numeric. Parameter estimate \(\left( \hat{\theta} \right)\). |
|---|---|
| sehat | Numeric.
Estimated standard error of |
| null | Numeric.
Hypothesized value of |
| dist | Character string.
|
| df | Numeric.
Degrees of freedom (df) if |
Returns a vector with the following elements:
Square root of Wald test statistic.
p-value.
The square root of the Wald test statistic for a single parameter is calculated
as follows:
$$
\sqrt{W}
=
\frac{
\hat{\theta} - \theta_0
}
{
\widehat{\mathrm{se}}
\left(
\hat{\theta}
\right)
} .
$$
The associated p-value
from the z or t distribution is calculated
using pnorm() or pt().
Other Wald test functions:
wald_test()
thetahat <- 0.860 sehat <- 0.409 sqrt_wald_test( thetahat = thetahat, sehat = sehat )#> statistic p #> 2.10268949 0.03549292sqrt_wald_test( thetahat = thetahat, sehat = sehat, dist = "t", df = 1000 )#> statistic p #> 2.10268949 0.03574239