Chow Test for Equality of Regression Models
Arguments
- y1
Numeric vector of responses for the first sample.
- x1
Numeric matrix of predictors for the first sample.
- y2
Numeric vector of responses for the second sample.
- x2
Numeric matrix of predictors for the second sample.
- x
Optional pooled design matrix for the combined sample. When supplied, the pooled regression is fitted using
xinstead ofrbind(x1, x2).
Value
An object of class "htest" containing:
statistic: Chow F statistic.parameter: numerator and denominator degrees of freedom.p.value: p-value for the test.method: description of the test.
Details
Chow's test assesses whether two linear regression models have identical regression coefficients.
Let n1 and n2 denote the sample sizes of the two groups and
let k denote the number of estimated parameters, including the
intercept.
The test proceeds as follows:
Fit a regression model to the combined data and obtain the residual sum of squares
S1.Fit separate regression models to the two groups and obtain residual sums of squares
S2andS3.Compute the Chow statistic
$$ F = \frac{\left[S_1-(S_2+S_3)\right]/k} {\left[(S_2+S_3)/(n_1+n_2-2k)\right]} $$
Under the null hypothesis that the regression coefficients are
identical in the two groups, the statistic follows an
F(k, n1 + n2 - 2k) distribution.
In haplotype trend regression applications, pooled haplotype
frequencies may be known in advance. In that case, the pooled
design matrix can be supplied directly through x.
References
Chow GC (1960). “Tests of Equality Between Sets of Coefficients in Two Linear Regressions.” Econometrica, 28(3), 591-605. doi:10.2307/1910133 .
Examples
if (FALSE) { # \dontrun{
dat1 <- matrix(c(
1.2, 1.9, 0.9,
1.6, 2.7, 1.3,
3.5, 3.7, 2.0,
4.0, 3.1, 1.8,
5.6, 3.5, 2.2,
5.7, 7.5, 3.5,
6.7, 1.2, 1.9,
7.5, 3.7, 2.7,
8.5, 0.6, 2.1,
9.7, 5.1, 3.6
), byrow = TRUE, ncol = 3)
dat2 <- matrix(c(
1.4, 1.3, 0.5,
1.5, 2.3, 1.3,
3.1, 3.2, 2.5,
4.4, 3.6, 1.1,
5.1, 3.1, 2.8,
5.2, 7.3, 3.3,
6.5, 1.5, 1.3,
7.8, 3.2, 2.2,
8.1, 0.1, 2.8,
9.5, 5.6, 3.9
), byrow = TRUE, ncol = 3)
y1 <- dat1[, 3]
y2 <- dat2[, 3]
x1 <- dat1[, 1:2]
x2 <- dat2[, 1:2]
chow.test(y1, x1, y2, x2)
} # }