Suppose we have k independent estimators of p-dimensional vectors theta_1, ..., theta_k. Under the null hypothesis H0 that the theta_i are all the same, the Cochran Q-statistic is the precision-weighted sum-of-squares of the estimators. In the asymptotic limit that each estimator is normally distributed, Cochran's Q-statistic under H0 follows a chi-square distribution with p*(k-1) degrees of freedom.

cochran_mq(est, ve)

Arguments

est

A k x p matrix of k independent estimates of a common p-dimensional parameter.

ve

A (p x p x k)-dimensional array of corresponding variance estimates.

Value

A list with elements:

Q

The value of the test statistic.

df

The degrees of freedom of the test.

pval

The p-value of the test.

coef

The combined estimate of the parameter under H0.

vcov

The variance estimate of the combined estimator.