# bothsidesmodel.chisquare: Test subsets of beta are zero In msos: Data Sets and Functions Used in Multivariate Statistics: Old School by John Marden

## Description

Tests the null hypothesis that an arbitrary subset of the β _{ij}'s is zero, based on the least squares estimates, using the χ^2 test as in Section 7.1. The null and alternative are specified by pattern matrices P_0 and P_A, respectively. If the P_A is omitted, then the alternative will be taken to be the unrestricted model.

## Usage

 ```1 2 3 4 5 6 7``` ```bothsidesmodel.chisquare( x, y, z, pattern0, patternA = matrix(1, nrow = ncol(x), ncol = ncol(z)) ) ```

## Arguments

 `x` An N x P design matrix. `y` The N x Q matrix of observations. `z` A Q x L design matrix. `pattern0` An N x P matrix of 0's and 1's specifying the null hypothesis. `patternA` An optional N x P matrix of 0's and 1's specifying the alternative hypothesis.

## Value

A 'list' with the following components:

Theta

The vector of estimated parameters of interest.

Covtheta

The estimated covariance matrix of the estimated parameter vector.

df

The degrees of freedom in the test.

chisq

T^2 statistic in (7.4).

pvalue

The p-value for the test.

`bothsidesmodel`, `bothsidesmodel.df`, `bothsidesmodel.hotelling`, `bothsidesmodel.lrt`, and `bothsidesmodel.mle`.

## Examples

 `1` ```# TBA - Submit a PR! ```

### Example output

```Loading required package: mclust
Package 'mclust' version 5.4.3
Type 'citation("mclust")' for citing this R package in publications.