Veja se te ajuda
| 

bartlett.test {stats} | R Documentation |


Bartlett Test of Homogeneity of Variances

Description
Performs Bartlett's test of the null that the variances in each of the groups 
(samples) are the same.
Usage
bartlett.test(x, ...)

## Default S3 method:
bartlett.test(x, g, ...)

## S3 method for class 'formula'
bartlett.test(formula, data, subset, na.action, ...)

Arguments

| x | a numeric vector of data values, or a list of numeric data vectors 
representing the respective samples, or fitted linear model objects (inheriting 
from class "lm"). |
| g | a vector or factor object giving the group for the corresponding elements 
of x. Ignored if x is a list. |
| formula | a formula of the form lhs ~ rhs where lhs gives the data values and 
rhs the corresponding groups. |
| data | an optional matrix or data frame (or similar: see model.frame) 
containing the variables in the formulaformula. By default the variables are 
taken from environment(formula). |
| subset | an optional vector specifying a subset of observations to be used. |
| na.action | a function which indicates what should happen when the data 
contain NAs. Defaults togetOption("na.action"). |
| ... | further arguments to be passed to or from methods. |


Details
If x is a list, its elements are taken as the samples or fitted linear models 
to be compared for homogeneity of variances. In this case, the elements must 
either all be numeric data vectors or fitted linear model objects, g is 
ignored, and one can simply use bartlett.test(x) to perform the test. If the 
samples are not yet contained in a list, usebartlett.test(list(x, 
...)).Otherwise, x must be a numeric data vector, and g must be a vector or 
factor object of the same length as x giving the group for the corresponding 
elements of x.
Value
A list of class "htest" containing the following components:
| statistic | Bartlett's K-squared test statistic. |
| parameter | the degrees of freedom of the approximate chi-squared 
distribution of the test statistic. |
| p.value | the p-value of the test. |
| method | the character string "Bartlett test of homogeneity of variances". |
| data.name | a character string giving the names of the data. |


References
Bartlett, M. S. (1937). Properties of sufficiency and statistical tests. 
Proceedings of the Royal Society of London Series A160, 268–282.
See Also
var.test for the special case of comparing variances in two samples from normal 
distributions; fligner.test for a rank-based (nonparametric) k-sample test for 
homogeneity of variances; ansari.test and mood.test for two rank based 
two-sample tests for difference in scale.
Examples
require(graphics)

plot(count ~ spray, data = InsectSprays)
bartlett.test(InsectSprays$count, InsectSprays$spray)
bartlett.test(count ~ spray, data = InsectSprays) Edson Lira
Estatístico
Manaus-Amazonas 

     Em Sexta-feira, 2 de Janeiro de 2015 10:44, Andre Oliveira 
<andreolso...@yahoo.com.br> escreveu:
   

 Qual seria  o  procedimento para para subdividida?  
Obrigado pessoal!
 

André Oliveira Souza. 
Graduação em Matemática, mestrado em estatística aplicada.Instituto Federal de 
Educação, Ciência e Tecnologia do Espirito Santo.  IFES

 

     Em Quinta-feira, 1 de Janeiro de 2015 23:23, Fernando Antonio de souza 
<nandodeso...@gmail.com> escreveu:
   

 VC pode criar uma variável interação e fazer o Bartlett. Teste sobre ela
Dados$interação<-interaction(fator1,fator2)
bartlett.test(resid(modelo2), dados$interaction)Em 01/01/2015 18:57, "Andre 
Oliveira" <andreolso...@yahoo.com.br> escreveu:

Mas neste caso como aplicar o bartlett.test?

bartlett.test(modelo2$residuals,fat1) # Homogeneidade de variâncias 
bartlett.test(modelo2$residuals,fat2) # Homogeneidade de variâncias 
Só assim? Por fatores separadamente? 


 

André Oliveira Souza. 
Graduação em Matemática, mestrado em estatística aplicada.Instituto Federal de 
Educação, Ciência e Tecnologia do Espirito Santo.  IFES

 

     Em Quinta-feira, 1 de Janeiro de 2015 18:40, henrique jose de paula alves 
paula alves <jpahenri...@gmail.com> escreveu:
   

 O teste de Bartley deve funcionar bem.
Em 1 de janeiro de 2015 17:52, Andre Oliveira <andreolso...@yahoo.com.br> 
escreveu:

 Pessoal boa tarde, dado meu modelo em fatorial. 
modelo=aov(respsota~factor1*factor2) 
Como avaliar homogeneidade de variâncias?
O que fiz aqui foi ..par(mfrow=c(2,2))
boxplot(resp~fat1)
boxplot(resp~fat2)
boxplot(resp~fat1*fat2)
interaction.plot(fat1,fat2,resp,ylab="Médias",main="Interação  Fat1 vs Fat2")


Mas está muito subjetivo. 



André Oliveira Souza. 
Graduação em Matemática, mestrado em estatística aplicada.Instituto Federal de 
Educação, Ciência e Tecnologia do Espirito Santo.  IFES


_______________________________________________
R-br mailing list
R-br@listas.c3sl.ufpr.br
https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br
Leia o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forneça código 
mínimo reproduzível.




-- 
Henrique José de Paula AlvesPós-graduando em Estatística - 35 9103-3364UFLA - 
LAVRAS -  MG

    
_______________________________________________
R-br mailing list
R-br@listas.c3sl.ufpr.br
https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br
Leia o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forneça código 
mínimo reproduzível.



    
_______________________________________________
R-br mailing list
R-br@listas.c3sl.ufpr.br
https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br
Leia o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forneça código 
mínimo reproduzível.

   
_______________________________________________
R-br mailing list
R-br@listas.c3sl.ufpr.br
https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br
Leia o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forneça código 
mínimo reproduzível.

Responder a