Description Usage Arguments Details Value References Examples

This function implements the Wald *chi-square* test on a *K*x*1* parameter vector **theta**. The test assumes that **thetaHat**, a consistent estimator of **theta** such as MLE, is asymptotically normal with mean **theta** and covariance matrix **Sigma**. The function can implement 1 test on **theta** as well as multiple, **Q**, tests jointly on **theta**.

1 |

`R` |
A |

`thetaHat` |
An estimate of |

`Sigma` |
An estimated covariance matrix for |

`r` |
A |

`L` |
A character string to be used as a name of the test. When NULL, "L" will be used. |

Suppose that Q tests are to be performed jointly on the K by 1 parameter vector **theta**. Let R be a *Q*x*K* matrix of known coefficients such as 0, 1, and -1, and r be a *Q*x*1* matrix of hypothesized values. The hypotheses are *H0:* *R**θ* = *r* vs. *H1*: *R**θ* != *r*. The test statistic has a chi-square distribution with Q degrees of freedom (Buse, 1982; Agresti, 2002).

A data.frame object of the Wald test results.

Agresti A. (2002). Categorical Data Analysis (2nd ed.). Wiley. ISBN 0471360937.

Buse A. (1982). The Likelihood Ratio, Wald, and Lagrange Multiplier Tests: An Expository Note. *The American Statistician*, 36:153-157.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | ```
## Example 1
# Parameter: p (proportion)
MLE <- 0.42
Var <- 0.016
# (a) Test H0: p = 0.50 vs. H1: p != 0.50
R <- matrix(1, nrow=1, ncol=1)
p0 <- 0.50
waldTest( R=R, thetaHat=MLE, r=p0, Sigma=Var )
## Example 2
# Parameter: beta = (beta1, beta2), regression coefficients
MLE <- c(1.09, 2.95)
Cov <- rbind(c(0.21, -0.27),
c(-0.27, 0.66))
# (a) Test H0: beta1 = beta2 vs. H1: beta1 != beta2
R <- rbind(c(1,-1))
waldTest( R=R, thetaHat=MLE, r=0, Sigma=Cov, L="1 vs 2" )
# (b) Test H0: beta1 = 0 vs. H1: beta1 != 0
R <- rbind(c(1,0))
waldTest( R=R, thetaHat=MLE, r=0, Sigma=Cov )
## Example 3
# Parameter: beta = (beta0, beta1, beta2)
MLE <- c(-3.05, 1.99, 0.93)
Cov <- rbind(c( 0.045, -0.022, -0.034),
c(-0.022, 0.032, 0.008),
c(-0.034, 0.008, 0.048))
# Performing simultaneous test:
# H0: beta0 = -3, H0: beta1 = 2, H0: beta2 = 1
# H1: beta0 != -3, H1: beta1 != 2, H1: beta2 != 1
R <- rbind(c(1,0,0),
c(0,1,0),
c(0,0,1))
r <- matrix( c(-3,2,1), nrow=3 )
waldTest( R=R, thetaHat=MLE, r=r, Sigma=Cov)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.