Skip to content
Back to formatted view

Raw Message

Message-ID: <427C2DE0561C49BF85906E608C401385@ccePC>
Date: 2009-11-30T11:42:38Z
From: Silvano
Subject: Bartlett' test
In-Reply-To: <1efa192d0911300222o4c868e21s12bf1b26cdb6d2c6@mail.gmail.com>

Hi,

I have an experiment with 5 treatments, of which 2 with 10 
repetitions and 2 with 7 replications.
I conducted the test of Bartlett step-by-step and compared 
with the value calculated directly by the R and the values 
are different.
Anyone know tell me why?


#-------------------

n = length(trat)
I = 4

(M = 2.3026*((n-I)*log10(mean(tapply(valor,trat,var))) - 
(9*log10(vari[1])+9*log10(vari[2])+6*log10(vari[3])+6*log10(vari[4]))))
(C = 1 + 1/(3*(4-1))*((1/9 + 1/9 + 1/6 + 1/6) - 
1/(9+9+6+6)))
(B = M/C)

> B
1.748670

> qchisq(.05, 3, lower.tail=F)    # Valor tabelado
[1] 7.814728

#-----------------------------------------
# Teste de Bartlett de forma direta no R -
#-----------------------------------------

bartlett.test(valor,trat)

        Bartlett test of homogeneity of variances

data:  valor and trat
Bartlett's K-squared = 0.7845, df = 3, p-value =
0.8532

Thanks,

--------------------------------------
Silvano Cesar da Costa
Departamento de Estat?stica
Universidade Estadual de Londrina
Fone: 3371-4346