Downloads
Henrique Gomide
CREPEIA, PET - Psicologia
Downloads
dados <- read.csv(file.choose(), header=TRUE, sep=",")
require(car)
As médias de duas amostras são calculadas*
Teste de Levene
leveneTest(y, group, ...)
onde:
Exemplo
leveneTest(somaescala ~ v9, data = dados)
## Levene's Test for Homogeneity of Variance (center = median)
## Df F value Pr(>F)
## group 1 1.22 0.27
## 51
Se p > .05, variâncias homogêneas.
t.test(x, y, data, alternative, paired)
Onde x - variável 1 y - variável 2 data - banco de dados alternative - "two.sided", "less" e "greater" paired - TRUE or FALSE var.equal - TRUE or FALSE
testeT <- t.test(somaescala ~ v9, data = dados)
testeT
##
## Welch Two Sample t-test
##
## data: somaescala by v9
## t = 0.3678, df = 34.31, p-value = 0.7153
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -1.177 1.697
## sample estimates:
## mean in group Não mean in group Sim
## 26.29 26.03
t <- testeT$statistic[[1]]
df <- testeT$parameter[[1]]
r <- sqrt(t^2/(t^2 + df))
round(r, 3)
## [1] 0.063
wilcox.test(x, y = NULL,
alternative = c("two.sided", "less", "greater"),
mu = 0, paired = FALSE, exact = NULL, correct = TRUE,
conf.int = FALSE, conf.level = 0.95, ...)
$W/sqrt(N)
Field, A. P., & Miles, J. (2012). Discovering statistics using R. Los Angeles; London: SAGE.