Multivariate statistical tests#
Canonical correlation:
Canonical correlation: See also: Wikipedia [1567].
Linear_discriminant_analysis: See also: Wikipedia [1573].
Principal_component_analysis: See also: Wikipedia [1580].
Regression_analysis: See also: Wikipedia [1581].
Linear_regression: See also: Wikipedia [1574].
Analysis_of_variance: See also: Wikipedia [1565].
One-way_analysis_of_variance: See also: Wikipedia [1578].
Design_matrix: See also: Wikipedia [1568].
Analysis_of_covariance: See also: Wikipedia [1587].
General_linear_model: See also: Wikipedia [1595].
Multivariate_analysis_of_variance: See also: Wikipedia [1597].
Multivariate_analysis_of_covariance: See also: Wikipedia [1596].
Correlation_and_dependence: See also: Wikipedia [1589].
Standardization: See also: Wikipedia [1594].
Multiple linear regression: p-value and confidence interval#
- ctx.multlinreg_test(self, ctx, mean, mean0, sd, n, alpha=0.05)#
where
ctxisdec,mpm, orgmp.Returns the results of tests for a CR or RB Anova.
Multiple linear regression Type I: power and sample size#
- ctx.multlinreg_type1_power(self, ctx, mean, mean0, sd, n, alpha=0.05)#
where
ctxisdec,mpm, orgmp.Returns the results of tests for a CR or RB Anova.
Multiple linear regression Type II: power and sample size#
- ctx.multlinreg_type2_power(self, ctx, mean, mean0, sd, n, alpha=0.05)#
where
ctxisdec,mpm, orgmp.Returns the results of tests for a CR or RB Anova.
Ref:
Kelley (2008): Sample size, confidence interval
Hotelling’s \(T^2\) test for 1 sample: p-value and confidence interval#
- ctx.hotelling_1sample_test(self, ctx, mean, mean0, sd, n, alpha=0.05)#
where
ctxisdec,mpm, orgmp.Returns the results of tests for a CR or RB Anova.
Hotelling’s \(T^2\) test for 1 sample: power and sample size#
- ctx.hotelling_1sample_power(self, ctx, mean, mean0, sd, n, alpha=0.05)#
where
ctxisdec,mpm, orgmp.Returns the results of tests for a CR or RB Anova.
Hotelling’s \(T^2\) test for 2 independent samples: p-value and confidence interval#
- ctx.hotelling_2isamples_test(self, ctx, mean, mean0, sd, n, alpha=0.05)#
where
ctxisdec,mpm, orgmp.Returns the results of tests for a CR or RB Anova.
Hotelling’s \(T^2\) test for 2 independent samples: power and sample size#
- ctx.hotelling_2isamples_power(self, ctx, mean, mean0, sd, n, alpha=0.05)#
where
ctxisdec,mpm, orgmp.Returns the results of tests for a CR or RB Anova.
Overview: 4 test criteria for 3 hypotheses#
Test explaining, based on Tretter and Bortz.
MANOVA: Wilks \(\Lambda\), Pillai’s \(V\), Hotelling’s \(T^2\), Roy’s largest root \(\theta\)#
- ctx.four_tests_glm_test(x, p, m, n, cdf=True, method='default')#
where
ctxisdec,mpm, orgmp.The Lawley-Hotelling generalized \(T_0^2\) and Pillai’s \(V\) statistic, defined respectively by
\[T_0^2 = n \text{tr} (AB^{-1}), \quad V = n \text{tr} (A(A+B)^{-1}),\]have been suggested as alternatives to Wilk’s criterion for testing multivariate linear hypotheses. Here \(A\) and \(B\) are independent \(p \times p\) Wishart matrices on \(q\) and \(n\) degrees of freedom respectively.
Canonical correlation: Wilks \(\Lambda\), Pillai’s \(V\), Hotelling’s \(T^2\), Roy’s largest root \(\theta\)#
- ctx.four_tests_ind_test(x, p, m, n, cdf=True, method='default')#
where
ctxisdec,mpm, orgmp.Some Text
Power estimates of 4 tests in MANOVA#
- ctx.four_tests_glm_power(x, p, m, n, Omega, cdf=True, method='default')#
where
ctxisfpm,mpm,ipm,dec,gmporapm.Returns \(\text{cdf}_X(x)\), the cumulative distribution function, for
cdf=True, or \(\text{sf}_X(x)\), the survival function, forcdf=False, of a random variable \(X\), following a noncentral Wilks’ \(\Lambda\) distribution under the GLM alternative,, with \(p \ge 1\) predictor variables, error degress of freedom \(m \ge 1\) and \(n \ge 1\), noncentrality parameter \(\Omega\) with diagonal entries \(\omega_{jj} \in (0,\infty)\) and the support interval \((0,1)\).This approach is discussed in detail in chapter …
There are other ways of calculating \(\text{pdf}_X(x)\) as well. If
methodis not specified, the algorithm is chosen automatically.For
fpm.the default method is to call the function provided by Boost. Otherwise, the default is verified integration.method='finite_series': the finite series described in … is used.method='infinite_series': the infinite series described in … is used.method='edgeworth': the edgeworth expansion described in … is used.method='lugannini_rice': the Lugannini-Rice saddlepoint approximation described in … is used.An example (CDF):
>>> from mpfunlab import dec, mpm, ipm, fpm, gmp, apm >>> mpm.dps = 40; x = '0.3'; p = '3'; m = '4'; n = '20'; O = [3.6, 1.2, 0.5] >>> dx = dec.four_tests_glm_cdf(x,p,m,n,O); mx = mpm.four_tests_glm_cdf(x,p,m,n,O) >>> ix = ipm.four_tests_glm_cdf(x,p,m,n,O); fx = fpm.four_tests_glm_cdf(x,p,m,n,O) >>> gx = gmp.four_tests_glm_cdf(x,p,m,n,O); ax = apm.four_tests_glm_cdf(x,p,m,n,O) >>> mpm.show([dx, mx, ix, fx, gx, ax]) dec: 9.727307040581953720491613246746146674676E-1 mpm: 9.727307040581953720491613246746146674676e-1 ipm: 9.727307040581953720491613246746146674676e-1 (5.901e-40%) fpm: 9.72730704058195E-01 gmp: 9.727307040581953720491613246746146674676E-01 ipm: 9.727307040581953720491613246746146674676e-1 (5.901e-40%)
Power estimates of 4 tests in canonical correlation (Type I)#
- ctx.four_tests_ind_power(x, p1, p2, n, Rho2, cdf=True, method='default')#
where
ctxisfpm,mpm,ipm,dec,gmporapm.Returns \(\text{cdf}_X(x)\), the cumulative distribution function, for
cdf=True, or \(\text{sf}_X(x)\), the survival function, forcdf=False, of a random variable \(X\), following a noncentral Wilks’ \(\Lambda\) distribution under the independence alternative, with \(p_1 \ge 1\) and \(p_2 \ge 1\) groups of variables, error degress of freedom \(n \ge 1\), noncentrality parameter \(P^2\) with diagonal entries \(\rho^2_{jj} \in (0,1)\) and the support interval \((0,1)\).This approach is discussed in detail in chapter …
There are other ways of calculating \(\text{pdf}_X(x)\) as well. If
methodis not specified, the algorithm is chosen automatically.For
fpm.the default method is to call the function provided by Boost. Otherwise, the default is verified integration.method='finite_series': the finite series described in … is used.method='infinite_series': the infinite series described in … is used.method='edgeworth': the edgeworth expansion described in … is used.method='lugannini_rice': the Lugannini-Rice saddlepoint approximation described in … is used.An example (CDF):
>>> from mpfunlab import dec, mpm, ipm, fpm, gmp, apm >>> mpm.dps = 40; x = '0.3'; p1 = '3'; p2 = '4'; n = '20'; P = [3.6, 1.2, 0.5] >>> dx = dec.four_tests_ind_cdf(x,p1,p2,n,P); mx = mpm.four_tests_ind_cdf(x,p1,p2,n,P) >>> ix = ipm.four_tests_ind_cdf(x,p1,p2,n,P); fx = fpm.four_tests_ind_cdf(x,p1,p2,n,P) >>> gx = gmp.four_tests_ind_cdf(x,p1,p2,n,P); ax = apm.four_tests_ind_cdf(x,p1,p2,n,P) >>> mpm.show([dx, mx, ix, fx, gx, ax]) dec: 9.727307040581953720491613246746146674676E-1 mpm: 9.727307040581953720491613246746146674676e-1 ipm: 9.727307040581953720491613246746146674676e-1 (5.901e-40%) fpm: 9.72730704058195E-01 gmp: 9.727307040581953720491613246746146674676E-01 ipm: 9.727307040581953720491613246746146674676e-1 (5.901e-40%)