Está en la página 1de 4

> macroinvert <- sqlQuery(channel = 2, select * from [Hoja1$])

> macroinvert

Estacion Transecto S N

1 CAÑO 1 6 55

2 CAÑO 2 4 208

3 CAÑO 3 3 193

4 CAÑO 4 2 101

5 ESTANQUE 1 5 78

6 ESTANQUE 2 7 199

7 ESTANQUE 3 6 170

8 ESTANQUE 4 4 197

> shapiro.test(macroinvert$S)

Shapiro-Wilk normality test

data: macroinvert$S

W = 0.9657, p-value = 0.862

> shapiro.test(macroinvert$N)
Shapiro-Wilk normality test

data: macroinvert$N

W = 0.8269, p-value = 0.05511

> tapply(macroinvert$S, macroinvert$Estacion, var, na.rm=TRUE)

CAÑO ESTANQUE

2.916667 1.666667

> levene.test(macroinvert$S, macroinvert$Estacion)

Levene's Test for Homogeneity of Variance

Df F value Pr(>F)

group 1 0.2 0.6704

> tapply(macroinvert$N, macroinvert$Estacion, var, na.rm=TRUE)

CAÑO ESTANQUE

5392.250 3236.667

> levene.test(macroinvert$N, macroinvert$Estacion)

Levene's Test for Homogeneity of Variance

Df F value Pr(>F)

group 1 0.9201 0.3745

6
> tapply(macroinvert$S, macroinvert$Estacion, var, na.rm=TRUE)

CAÑO ESTANQUE

2.916667 1.666667

> levene.test(macroinvert$S, macroinvert$Estacion)

Levene's Test for Homogeneity of Variance

Df F value Pr(>F)

group 1 0.2 0.6704

> tapply(macroinvert$N, macroinvert$Estacion, var, na.rm=TRUE)

CAÑO ESTANQUE

5392.250 3236.667

> levene.test(macroinvert$N, macroinvert$Estacion)

Levene's Test for Homogeneity of Variance

Df F value Pr(>F)

group 1 0.9201 0.3745

> t.test(S~Estacion, alternative='two.sided', conf.level=.95, var.equal=FALSE, data=macroinvert)


Welch Two Sample t-test

data: S by Estacion

t = -1.6348, df = 5.585, p-value = 0.1569

alternative hypothesis: true difference in means is not equal to 0

95 percent confidence interval:

-4.4172206 0.9172206

sample estimates:

mean in group CAÑO mean in group ESTANQUE

3.75 5.50

> t.test(N~Estacion, alternative='two.sided', conf.level=.95, var.equal=FALSE, data=macroinvert)

Welch Two Sample t-test

data: N by Estacion

t = -0.4683, df = 5.648, p-value = 0.6571

alternative hypothesis: true difference in means is not equal to 0

95 percent confidence interval:

-137.14074 93.64074

sample estimates:

mean in group CAÑO mean in group ESTANQUE

139.25 161.00

También podría gustarte