wald_test: Wald Test Statistic for a Single Parameter

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/wald.R

Description

Calculates the Wald test statistic for a single parameter.

Usage

1
wald_test(thetahat, varhat, null = 0)

Arguments

thetahat

Numeric. Parameter estimate ≤ft( \hat{θ} \right).

varhat

Numeric. Estimated variance of thetahat ≤ft( \widehat{\mathrm{Var}} ≤ft( \hat{θ} \right) \right).

null

Numeric. Hypothesized value of theta ≤ft( θ_{0} \right). Set to zero by default.

Details

The Wald test statistic for a single parameter is calculated as follows:

W = \frac{ ≤ft( \hat{θ} - θ_0 \right)^2 } { \widehat{\mathrm{Var}} ≤ft( \hat{θ} \right) }

The associated p-value from the chi-square distribution is calculated using pchisq() with df = 1.

Value

Returns a vector with the following elements:

statistic

Wald test statistic.

p

p-value.

Author(s)

Ivan Jacob Agaloos Pesigan

References

Wikipedia: Wald test

See Also

Other Wald test functions: sqrt_wald_test()

Examples

1
2
3
4
5
6
7
thetahat <- 0.860
sehat <- 0.409
varhat <- sehat^2
wald_test(
  thetahat = thetahat,
  varhat = varhat
)

jeksterslabds/jeksterslabRboot documentation built on July 20, 2020, 12:56 p.m.