Baixe o app para aproveitar ainda mais
Prévia do material em texto
PROGRAMA DE AULA Teste de igualdade de médias Função discriminante padronizada e não padronizada Centróide TESTE UNIVARIADO DE IGUALDADE DE MÉDIAS DE CADA VARIÁVEL NOS GRUPOS Hipóteses do teste: H0: as médias de cada variável são = nos grupos H1: as médias de cada variável são diferentes nos grupos Estatística WILKS’ LAMBDA Para cada variável é obtida a estatística WILKS’ LAMBDA : razão entre variância interna nos grupos e a variância total. Quanto menor o valor de WILKS’ LAMBDA , maior a relevância da variável para discriminar os grupos. Estatística WILKS’LAMBDA PARA CADA VARIÁVEL WILKS’LAMBDA Wilk’s Lambda próximo de 1 Para determinada variável independente as médias são = nos grupos A variável independente não discrimina Wilk’s Lambda próximo de 0 As médias são diferentes A variável independente discrimina A estatística Wilk’s Lambda tem distribuição F. A partir da estatística F será testada a significância da Wilk’s Lambda . TESTE UNIVARIADO DE IGUALDADE DE MÉDIAS DE CADA VARIÁVEL NOS GRUPOS Hipóteses do teste: H0: as médias de cada variável são = nos grupos H1: as médias de cada variável são diferentes nos grupos Estatística F Para cada variável é obtida a estatística F : razão entre variância externa entre os grupos e variância interna. Quanto maior o valor de F , maior a relevância da variável para discriminar os grupos. EXEMPLO Considerando cada variável separadamente, a melhor é a PETALWID (menor Wilks’ Lambda e maior F) e a pior é a SEPALWID. EXEMPLO Passo 1: Petalwid no modelo Passo 2: Petalwid e Sepalwid no modelo Passo 3: Petalwid, Sepalwid e Petallen no modelo Passo 4: Petalwid, Sepalwid, Petallen e Sepallen no modelo EXEMPLO As variáveis Petallen e Sepallen só começaram a entrar no Passo 3 por terem apresentado alta correlação entre si (0,813). EXEMPLO À medida que cada variável entrou no modelo, o valor de Wilks’ Lambda foi diminuindo. Considerando as variáveis conjuntamente, houve uma sinergia que reduziu o valor final da estatística Wilks’ Lambda para 0,217. FUNÇÃO DISCRIMINANTE COMBINAÇÃO LINEAR DE VARIÁVEIS INDEPENDENTES SELECIONADAS POR SEU PODER DISCRIMINATÓRIO NA ALOCAÇÃO DE ELEMENTOS A GRUPOS X GRUPOS : X - 1 FUNÇÕES DISCRIMINANTES EX: 3 GRUPOS - 2 FUNÇÕES DISCRIMINANTES ; 1a FUNÇÃO SEPARA UM GRUPO DOS OUTROS DOIS E A 2a SEPARA OS DOIS GRUPOS RESTANTES São fornecidas funções discriminantes com coeficientes padronizados e não padronizados. EXEMPLO Função discriminante padronizada 0,939 . PETALLEN + 0,779. PETALWID - 0,537. SEPALLEN - 0,460. SEPALWID Função discriminante não padronizada 0,186 . PETALLEN + 0,327. PETALWID - 0,094. SEPALLEN - 0,145. SEPALWID -4,596 EXEMPLO CENTRÓIDE MÉDIA DE CADA GRUPO OBTIDA A PARTIR DA FUNÇÃO DISCRIMINANTE NÃO PADRONIZADA APLICADA NAS MÉDIAS DAS VARIÁVEIS 2 GRUPOS : 2 CENTRÓIDES 3 GRUPOS : 3 CENTRÓIDES ETC. EXEMPLO Centroide no Grupo 1: = 0,186 . PETALLEN + 0,327. PETALWID - 0,094. SEPALLEN - 0,145. SEPALWID - 4,596 = 0,186 . 42,8 + 0,327. 13,33 - 0,094. 59,55 - 0,145. 27,8 - 4,596 = -1,8978 EXEMPLO Se os dois grupos tivessem o mesmo tamanho, os centroides seriam idênticos, apenas com sinais opostos. Neste exemplo, os grupos 1 e 2 têm os seguintes tamanhos: 49 e 50. Plan1 Variables in the Analysis Step Tolerance F to Remove Wilks' Lambda 1 PETALLEN 1 1216.098674425 2 PETALLEN 0.867 1123.947 0.604 SEPALWID 0.867 39.755 0.057 3 PETALLEN 0.750 40.058 0.039 SEPALWID 0.758 50.668 0.042 PETALWID 0.680 34.364 0.037 4 PETALLEN 0.375 36.219 0.035 SEPALWID 0.617 20.714 0.030 PETALWID 0.660 24.822 0.031 SEPALLEN 0.356 4.587 0.025 Step Number of Variables Wilks' Lambda Sig. 1 1 0.057 0.000 2 2 0.037 0.000 3 3 0.025 0.000 4 4 0.023 0.000 Eigenvalues Function Eigenvalue % of Variance Cumulative % 1 32.7539907728 99.1721424134 99.1721424134 2 0.2734199251 0.8278575866 100 a First 2 canonical discriminant functions were used in the analysis. Mean Std. Dev IRISTYPE Pooled Within-Groups Matrices - Correlation 1 PETALLEN 42.7959183673 4.537 PETALLEN PETALWID SEPALLEN SEPALWID PETALWID 13.3265306122 1.941 PETALLEN 1.000 0.484 0.813 0.457 SEPALLEN 59.5510204082 5.033 PETALWID 0.484 1.000 0.364 0.574 SEPALWID 27.7959183673 3.096 SEPALLEN 0.813 0.364 1.000 0.473 2 PETALLEN 55.52 5.519 SEPALWID 0.457 0.574 0.473 1.000 PETALWID 20.26 2.747 SEPALLEN 65.88 6.359 SEPALWID 29.74 3.225 Tests of Equality of Group Means Total PETALLEN 49.2222222222 8.136 Wilks' Lambda F Sig. PETALWID 16.8282828283 4.214 PETALLEN 0.382 156.685 0 SEPALLEN 62.7474747475 6.538 PETALWID 0.316 209.666 0 SEPALWID 28.7777777778 3.294 SEPALLEN 0.763 30.073 0.0000003306 SEPALWID 0.912 9.357 0.0028714169 Plan2 Plan3 Plan1 Variables in the Analysis Step Tolerance F to Remove Wilks' Lambda 1 PETALLEN 1 1216.098674425 2 PETALLEN 0.867 1123.947 0.604 SEPALWID 0.867 39.755 0.057 3 PETALLEN 0.750 40.058 0.039 SEPALWID 0.758 50.668 0.042 PETALWID 0.680 34.364 0.037 4 PETALLEN 0.375 36.219 0.035 SEPALWID 0.617 20.714 0.030 PETALWID 0.660 24.822 0.031 SEPALLEN 0.356 4.587 0.025 Step Number of Variables Wilks' Lambda Sig. 1 1 0.057 0.000 2 2 0.037 0.000 3 3 0.025 0.000 4 4 0.023 0.000 Eigenvalues Function Eigenvalue % of Variance Cumulative % 1 32.7539907728 99.1721424134 99.1721424134 2 0.2734199251 0.8278575866 100 a First 2 canonical discriminant functions were used in the analysis. Mean Std. Dev IRISTYPE Pooled Within-Groups Matrices - Correlation 1 PETALLEN 42.7959183673 4.537 PETALLEN PETALWID SEPALLEN SEPALWID PETALWID 13.3265306122 1.941 PETALLEN 1.000 0.484 0.813 0.457 SEPALLEN 59.5510204082 5.033 PETALWID 0.484 1.000 0.364 0.574 SEPALWID 27.7959183673 3.096 SEPALLEN 0.813 0.364 1.000 0.473 2 PETALLEN 55.52 5.519 SEPALWID 0.457 0.574 0.473 1.000 PETALWID 20.26 2.747 SEPALLEN 65.88 6.359 SEPALWID 29.74 3.225 Tests of Equality of Group Means Total PETALLEN 49.2222222222 8.136 Wilks' Lambda F Sig. PETALWID 16.8282828283 4.214 PETALLEN 0.382 156.685 0 SEPALLEN 62.7474747475 6.538 PETALWID 0.316 209.666 0 SEPALWID 28.7777777778 3.294 SEPALLEN 0.763 30.073 0.0000003306 SEPALWID 0.912 9.357 0.0028714169 Box's M 35.8769355421 F Approx. 3.4278306005 df1 10 df2 44940.0760735144 Sig. 0.0001661527 Tests null hypothesis of equal population covariance matrices Entered Wilks' Lambda Statistic Step Sig. 1 PETALWID 0.316 0 2 SEPALWID 0.279 0 3 PETALLEN 0.234 0 4 SEPALLEN 0.217 0 At each step, the variable that minimizes the overall Wilks' Lambda is entered. Plan2 Plan3 Plan1 Variables in the Analysis Step Tolerance F to Remove Wilks' Lambda 1 PETALLEN 1 1216.098674425 2 PETALLEN 0.867 1123.947 0.604 SEPALWID 0.867 39.755 0.057 3 PETALLEN 0.750 40.058 0.039 SEPALWID 0.758 50.668 0.042 PETALWID 0.680 34.364 0.037 4 PETALLEN 0.375 36.219 0.035 SEPALWID 0.617 20.714 0.030 PETALWID 0.660 24.822 0.031 SEPALLEN 0.356 4.587 0.025 Step Number of Variables Wilks' Lambda Sig. 1 1 0.057 0.000 2 2 0.037 0.000 3 3 0.025 0.000 4 4 0.023 0.000 Eigenvalues Function Eigenvalue % of Variance Cumulative % 1 32.7539907728 99.172142413499.1721424134 2 0.2734199251 0.8278575866 100 a First 2 canonical discriminant functions were used in the analysis. Mean Std. Dev IRISTYPE Pooled Within-Groups Matrices - Correlation 1 PETALLEN 42.7959183673 4.537 PETALLEN PETALWID SEPALLEN SEPALWID PETALWID 13.3265306122 1.941 PETALLEN 1.000 0.484 0.813 0.457 SEPALLEN 59.5510204082 5.033 PETALWID 0.484 1.000 0.364 0.574 SEPALWID 27.7959183673 3.096 SEPALLEN 0.813 0.364 1.000 0.473 2 PETALLEN 55.52 5.519 SEPALWID 0.457 0.574 0.473 1.000 PETALWID 20.26 2.747 SEPALLEN 65.88 6.359 SEPALWID 29.74 3.225 Tests of Equality of Group Means Total PETALLEN 49.2222222222 8.136 Wilks' Lambda F Sig. PETALWID 16.8282828283 4.214 PETALLEN 0.382 156.685 0 SEPALLEN 62.7474747475 6.538 PETALWID 0.316 209.666 0 SEPALWID 28.7777777778 3.294 SEPALLEN 0.763 30.073 0.0000003306 SEPALWID 0.912 9.357 0.0028714169 Plan2 Plan3 Plan1 Variables in the Analysis Step Tolerance F to Remove Wilks' Lambda 1 PETALLEN 1 1216.098674425 2 PETALLEN 0.867 1123.947 0.604 SEPALWID 0.867 39.755 0.057 3 PETALLEN 0.750 40.058 0.039 SEPALWID 0.758 50.668 0.042 PETALWID 0.680 34.364 0.037 4 PETALLEN 0.375 36.219 0.035 SEPALWID 0.617 20.714 0.030 PETALWID 0.660 24.822 0.031 SEPALLEN 0.356 4.587 0.025 Step Number of Variables Wilks' Lambda Sig. 1 1 0.057 0.000 2 2 0.037 0.000 3 3 0.025 0.000 4 4 0.023 0.000 Eigenvalues Function Eigenvalue % of Variance Cumulative % 1 32.7539907728 99.1721424134 99.1721424134 2 0.2734199251 0.8278575866 100 a First 2 canonical discriminant functions were used in the analysis. Mean Std. Dev IRISTYPE Pooled Within-Groups Matrices - Correlation 1 PETALLEN 42.7959183673 4.537 PETALLEN PETALWID SEPALLEN SEPALWID PETALWID 13.3265306122 1.941 PETALLEN 1.000 0.484 0.813 0.457 SEPALLEN 59.5510204082 5.033 PETALWID 0.484 1.000 0.364 0.574 SEPALWID 27.7959183673 3.096 SEPALLEN 0.813 0.364 1.000 0.473 2 PETALLEN 55.52 5.519 SEPALWID 0.457 0.574 0.473 1.000 PETALWID 20.26 2.747 SEPALLEN 65.88 6.359 SEPALWID 29.74 3.225 Tests of Equality of Group Means Total PETALLEN 49.2222222222 8.136 Wilks' Lambda F Sig. PETALWID 16.8282828283 4.214 PETALLEN 0.382 156.685 0 SEPALLEN 62.7474747475 6.538 PETALWID 0.316 209.666 0 SEPALWID 28.7777777778 3.294 SEPALLEN 0.763 30.073 0.0000003306 SEPALWID 0.912 9.357 0.0028714169 Box's M 35.8769355421 F Approx. 3.4278306005 df1 10 df2 44940.0760735144 Sig. 0.0001661527 Tests null hypothesis of equal population covariance matrices Entered Wilks' Lambda Statistic Step Sig. 1 PETALWID 0.316 0 2 SEPALWID 0.279 0 3 PETALLEN 0.234 0 4 SEPALLEN 0.217 0 At each step, the variable that minimizes the overall Wilks' Lambda is entered. Plan2 Plan3 Plan1 Variables in the Analysis Step Tolerance F to Remove Wilks' Lambda 1 PETALLEN 1 1216.098674425 2 PETALLEN 0.867 1123.947 0.604 SEPALWID 0.867 39.755 0.057 3 PETALLEN 0.750 40.058 0.039 SEPALWID 0.758 50.668 0.042 PETALWID 0.680 34.364 0.037 4 PETALLEN 0.375 36.219 0.035 SEPALWID 0.617 20.714 0.030 PETALWID 0.660 24.822 0.031 SEPALLEN 0.356 4.587 0.025 Step Number of Variables Wilks' Lambda Sig. 1 1 0.057 0.000 2 2 0.037 0.000 3 3 0.025 0.000 4 4 0.023 0.000 Eigenvalues Function Eigenvalue % of Variance Cumulative % 1 32.7539907728 99.1721424134 99.1721424134 2 0.2734199251 0.8278575866 100 a First 2 canonical discriminant functions were used in the analysis. Mean Std. Dev IRISTYPE Pooled Within-Groups Matrices - Correlation 1 PETALLEN 42.7959183673 4.537 PETALLEN PETALWID SEPALLEN SEPALWID PETALWID 13.3265306122 1.941 PETALLEN 1.000 0.484 0.813 0.457 SEPALLEN 59.5510204082 5.033 PETALWID 0.484 1.000 0.364 0.574 SEPALWID 27.7959183673 3.096 SEPALLEN 0.813 0.364 1.000 0.473 2 PETALLEN 55.52 5.519 SEPALWID 0.457 0.574 0.473 1.000 PETALWID 20.26 2.747 SEPALLEN 65.88 6.359 SEPALWID 29.74 3.225 Tests of Equality of Group Means Total PETALLEN 49.2222222222 8.136 Wilks' Lambda F Sig. PETALWID 16.8282828283 4.214 PETALLEN 0.382 156.685 0 SEPALLEN 62.7474747475 6.538 PETALWID 0.316 209.666 0 SEPALWID 28.7777777778 3.294 SEPALLEN 0.763 30.073 0.0000003306 SEPALWID 0.912 9.357 0.0028714169 Box's M 35.8769355421 F Approx. 3.4278306005 df1 10 df2 44940.0760735144 Sig. 0.0001661527 Tests null hypothesis of equal population covariance matrices Entered Wilks' Lambda Statistic Step Sig. 1 PETALWID 0.316 0 2 SEPALWID 0.279 0 3 PETALLEN 0.234 0 4 SEPALLEN 0.217 0 At each step, the variable that minimizes the overall Wilks' Lambda is entered. Eigenvalues Function Eigenvalue % of Variance Cumulative % Canonical Correlation 1 3.6023244138 100 100 0.8847137896 Structure Matrix Function 1 PETALWID 0.775 PETALLEN 0.670 SEPALLEN 0.293 SEPALWID 0.164 Pooled within-groups correlations between discriminating variables and standardized canonical discriminant functions Standardized Canonical Discriminant Function Coefficients Function 1 PETALLEN 0.939 PETALWID 0.779 SEPALLEN -0.537 SEPALWID -0.460 Canonical Discriminant Function Coefficients Function 1 PETALLEN 0.186 PETALWID 0.327 SEPALLEN -0.094 SEPALWID -0.145 (Constant) -4.596 Unstandardized coefficients Functions at Group Centroids Function IRISTYPE 1 1 -1.8978 2 1.8598 Unstandardized canonical discriminant functions evaluated at group means Classification Function Coefficients IRISTYPE 1 2 PETALLEN -0.195 0.503 PETALWID -0.031 1.199 SEPALLEN 1.528 1.176 SEPALWID 1.625 1.079 (Constant) -64.404 -81.602 Fisher's linear discriminant functions Classification Results Predicted Group Membership Total IRISTYPE 1 2 Original Count 1 47 2 49 2 1 49 50 % 1 95.918 4.082 100 2 2 98 100 97,0% of original grouped cases correctly classified. Plan2 Plan3 Plan1 Variables in the Analysis Step Tolerance F to Remove Wilks' Lambda 1 PETALLEN 1 1216.098674425 2 PETALLEN 0.867 1123.947 0.604 SEPALWID 0.867 39.755 0.057 3 PETALLEN 0.750 40.058 0.039 SEPALWID 0.758 50.668 0.042 PETALWID 0.680 34.364 0.037 4 PETALLEN 0.375 36.219 0.035 SEPALWID 0.617 20.714 0.030 PETALWID 0.660 24.822 0.031 SEPALLEN 0.356 4.587 0.025 Step Number of Variables Wilks' Lambda Sig. 1 1 0.057 0.000 2 2 0.037 0.000 3 3 0.025 0.000 4 4 0.023 0.000 Eigenvalues Function Eigenvalue % of Variance Cumulative % 1 32.7539907728 99.1721424134 99.1721424134 2 0.2734199251 0.8278575866 100 a First 2 canonical discriminant functions were used in the analysis. Mean Std. Dev IRISTYPE 1 PETALLEN 42.7959183673 4.537 PETALWID 13.3265306122 1.941 SEPALLEN 59.5510204082 5.033 SEPALWID 27.7959183673 3.096 2 PETALLEN 55.52 5.519 PETALWID 20.26 2.747 SEPALLEN 65.88 6.359 SEPALWID 29.74 3.225 Total PETALLEN 49.22222222228.136 PETALWID 16.8282828283 4.214 SEPALLEN 62.7474747475 6.538 SEPALWID 28.7777777778 3.294 Plan2 Plan3 Plan1 Variables in the Analysis Step Tolerance F to Remove Wilks' Lambda 1 PETALLEN 1 1216.098674425 2 PETALLEN 0.867 1123.947 0.604 SEPALWID 0.867 39.755 0.057 3 PETALLEN 0.750 40.058 0.039 SEPALWID 0.758 50.668 0.042 PETALWID 0.680 34.364 0.037 4 PETALLEN 0.375 36.219 0.035 SEPALWID 0.617 20.714 0.030 PETALWID 0.660 24.822 0.031 SEPALLEN 0.356 4.587 0.025 Step Number of Variables Wilks' Lambda Sig. 1 1 0.057 0.000 2 2 0.037 0.000 3 3 0.025 0.000 4 4 0.023 0.000 Eigenvalues Function Eigenvalue % of Variance Cumulative % 1 32.7539907728 99.1721424134 99.1721424134 2 0.2734199251 0.8278575866 100 a First 2 canonical discriminant functions were used in the analysis. Mean Std. Dev IRISTYPE Pooled Within-Groups Matrices - Correlation 1 PETALLEN 42.7959183673 4.537 PETALLEN PETALWID SEPALLEN SEPALWID PETALWID 13.3265306122 1.941 PETALLEN 1.000 0.484 0.813 0.457 SEPALLEN 59.5510204082 5.033 PETALWID 0.484 1.000 0.364 0.574 SEPALWID 27.7959183673 3.096 SEPALLEN 0.813 0.364 1.000 0.473 2 PETALLEN 55.52 5.519 SEPALWID 0.457 0.574 0.473 1.000 PETALWID 20.26 2.747 SEPALLEN 65.88 6.359 SEPALWID 29.74 3.225 Tests of Equality of Group Means Total PETALLEN 49.2222222222 8.136 Wilks' Lambda F Sig. PETALWID 16.8282828283 4.214 PETALLEN 0.382 156.685 0 SEPALLEN 62.7474747475 6.538 PETALWID 0.316 209.666 0 SEPALWID 28.7777777778 3.294 SEPALLEN 0.763 30.073 0.0000003306 SEPALWID 0.912 9.357 0.0028714169 Box's M 35.8769355421 F Approx. 3.4278306005 df1 10 df2 44940.0760735144 Sig. 0.0001661527 Tests null hypothesis of equal population covariance matrices Entered Wilks' Lambda Statistic Step Sig. 1 PETALWID 0.316 0 2 SEPALWID 0.279 0 3 PETALLEN 0.234 0 4 SEPALLEN 0.217 0 At each step, the variable that minimizes the overall Wilks' Lambda is entered. Eigenvalues Function Eigenvalue % of Variance Cumulative % Canonical Correlation 1 3.6023244138 100 100 0.8847137896 Structure Matrix Function 1 PETALWID 0.775 PETALLEN 0.670 SEPALLEN 0.293 SEPALWID 0.164 Pooled within-groups correlations between discriminating variables and standardized canonical discriminant functions Standardized Canonical Discriminant Function Coefficients Function 1 PETALLEN 0.939 PETALWID 0.779 SEPALLEN -0.537 SEPALWID -0.460 Canonical Discriminant Function Coefficients Function 1 PETALLEN 0.186 PETALWID 0.327 SEPALLEN -0.094 SEPALWID -0.145 (Constant) -4.596 Unstandardized coefficients Functions at Group Centroids Function IRISTYPE 1 1 -1.8978 2 1.8598 Unstandardized canonical discriminant functions evaluated at group means Classification Function Coefficients IRISTYPE 1 2 PETALLEN -0.195 0.503 PETALWID -0.031 1.199 SEPALLEN 1.528 1.176 SEPALWID 1.625 1.079 (Constant) -64.404 -81.602 Fisher's linear discriminant functions Classification Results Predicted Group Membership Total IRISTYPE 1 2 Original Count 1 47 2 49 2 1 49 50 % 1 95.918 4.082 100 2 2 98 100 97,0% of original grouped cases correctly classified. Plan2 Plan3
Compartilhar