gkgammatst

버전 1.1.0.0 (3.65 KB) 작성자: Antonio Trujillo-Ortiz
Goodman-Kruskal's gamma test.
다운로드 수: 516
업데이트 날짜: 2013/7/16

라이선스 보기

It is an inference on the measure of correlation among two ordered qualitative variables. Measuring strength of association of cross tabulated data. It was proposed by Leo Goodman and William Kruskal across a series of papers (1954, 1959, 1963 and 1972).

A pair of observations is concordant if the subject who is higher on one variable also is higher on the other variable, and a pair of observations is discordant if the subject who is higher on one variable is lower on the other variable (Goktas and Qznur, 2011).

If C > D the variables have a positive association, but if C < D then the variables have a negative association. C and D are, respectivelly, the total number of concordances and discordances.

The ratio (C - D)/(C + D) is the Goodman-Kruskal´s gamma statistic (g). It can lie between -1 and 1. Sign indicates if ther is a negative or positive association. The magnitude indicates strength of association.

The asymtotic Goodman-Kruskal's gamma variance is calculated as,

varg = 4/(C + D)^2*(Sum_i Sum_j n_ij*((A_ij - B_ij)^2 - (C - D)^2/n)

where,
A_ij = Sum_k<i Sum_l<j a_kl + Sum_k>i Sum_l>j a_kl

B_ij = Sum_k>i Sum_l<j a_kl + Sum_k<i Sum_l>j a_kl

a_ij denote the observed frequency in cell (i,j) in an I x J contingency table.

Concordances, C is: C = Sum_i Sum_j a_ij*A_ij

Discordances, D is: D = Sum_i Sum_j a_ij*B_ij

The z-value = g/sqrt(varg)

Null hypothesis: no association (no relationship or independence) corresponding gamma = 0. Alternative hypothesis (one-sided) gamma < 0 or gamma > 0.

Syntax: function gkgammatst(x,alpha,tail)

Inputs:
x – rxc data matrix
alpha - significance value (default=0.05)
tail - two-sided=0; one-sided~=0

Output:
- Summary statistics from the analysis

인용 양식

Antonio Trujillo-Ortiz (2024). gkgammatst (https://www.mathworks.com/matlabcentral/fileexchange/42645-gkgammatst), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2010a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Gamma Functions에 대해 자세히 알아보기
커뮤니티
 Power Electronics Control 커뮤니티에 더 많은 파일이 있습니다

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.1.0.0

It was added an appropriate format to cite this file.

1.0.0.0