You are on page 1of 7

T1<-c(1.39,1.19,1.01,0.

99)

> T2<-c(1.19,0.91,1.15,1.05)

> T3<-c(1.10,1.18,1.14,1.34)

> T4<-c(1.07,1.25,0.85,1.23)

> T5<-c(1.03,1.40,0.97,1.20)

> T6<-c(1.03,1.12,1.17,1.36)

> mean(T1,T2,T3,T4,T5,T6)

Error en mean.default(T1, T2, T3, T4, T5, T6) :

'trim' must be numeric of length one

Además: Warning message:

In if (na.rm) x <- x[!is.na(x)] :

la condición tiene longitud > 1 y sólo el primer elemento será usado

> t.test(T1,mu=1.13)

One Sample t-test

data: T1

t = 0.1609, df = 3, p-value = 0.8824

alternative hypothesis: true mean is not equal to 1.13

95 percent confidence interval:

0.8483034 1.4416966

sample estimates:

mean of x

1.145

> t-test(T2,mu=1.13)

Error: no se pudo encontrar la función "test"

> t.test(T2,mu=1.13)
One Sample t-test

data: T2

t = -0.8816, df = 3, p-value = 0.4429

alternative hypothesis: true mean is not equal to 1.13

95 percent confidence interval:

0.8764687 1.2735313

sample estimates:

mean of x

1.075

> t.test(T3,mu=1.13)

One Sample t-test

data: T3

t = 1.1407, df = 3, p-value = 0.3368

alternative hypothesis: true mean is not equal to 1.13

95 percent confidence interval:

1.022606 1.357394

sample estimates:

mean of x

1.19

> t.test(T4,mu=1.13)

One Sample t-test

data: T4
t = -0.3241, df = 3, p-value = 0.7671

alternative hypothesis: true mean is not equal to 1.13

95 percent confidence interval:

0.8054446 1.3945554

sample estimates:

mean of x

1.1

> t.test(T5,mu=1.13)

One Sample t-test

data: T5

t = 0.2072, df = 3, p-value = 0.8491

alternative hypothesis: true mean is not equal to 1.13

95 percent confidence interval:

0.8428211 1.4571789

sample estimates:

mean of x

1.15

> t.test(T6,mu=1.13)

One Sample t-test

data: T6

t = 0.5744, df = 3, p-value = 0.606

alternative hypothesis: true mean is not equal to 1.13

95 percent confidence interval:


0.9483683 1.3916317

sample estimates:

mean of x

1.17

> resp<-c(T1,T2,T3,T4,T5,T6);resp

[1] 1.39 1.19 1.01 0.99 1.19 0.91 1.15 1.05 1.10 1.18 1.14 1.34 1.07 1.25 0.85

[16] 1.23 1.03 1.40 0.97 1.20 1.03 1.12 1.17 1.36

> tapply(resp,trat,length)

Error en tapply(resp, trat, length) : objeto 'trat' no encontrado

> trat<-gl(6,4,labels=c("T1","T2","T3","T4","T5","T6"))

> tapply(resp,trat,length)

T1 T2 T3 T4 T5 T6

4 4 4 4 4 4

> tapply(resp,trat,mean)

T1 T2 T3 T4 T5 T6

1.145 1.075 1.190 1.100 1.150 1.170

> tapply(resp,trat,var)

T1 T2 T3 T4 T5 T6

0.03476667 0.01556667 0.01106667 0.03426667 0.03726667 0.01940000

> tapply(resp,trat,t.test,mu=1.13)

$T1

One Sample t-test

data: X[[1L]]

t = 0.1609, df = 3, p-value = 0.8824

alternative hypothesis: true mean is not equal to 1.13

95 percent confidence interval:


0.8483034 1.4416966

sample estimates:

mean of x

1.145

$T2

One Sample t-test

data: X[[2L]]

t = -0.8816, df = 3, p-value = 0.4429

alternative hypothesis: true mean is not equal to 1.13

95 percent confidence interval:

0.8764687 1.2735313

sample estimates:

mean of x

1.075

$T3

One Sample t-test

data: X[[3L]]

t = 1.1407, df = 3, p-value = 0.3368

alternative hypothesis: true mean is not equal to 1.13

95 percent confidence interval:

1.022606 1.357394
sample estimates:

mean of x

1.19

$T4

One Sample t-test

data: X[[4L]]

t = -0.3241, df = 3, p-value = 0.7671

alternative hypothesis: true mean is not equal to 1.13

95 percent confidence interval:

0.8054446 1.3945554

sample estimates:

mean of x

1.1

$T5

One Sample t-test

data: X[[5L]]

t = 0.2072, df = 3, p-value = 0.8491

alternative hypothesis: true mean is not equal to 1.13

95 percent confidence interval:

0.8428211 1.4571789

sample estimates:
mean of x

1.15

$T6

One Sample t-test

data: X[[6L]]

t = 0.5744, df = 3, p-value = 0.606

alternative hypothesis: true mean is not equal to 1.13

95 percent confidence interval:

0.9483683 1.3916317

sample estimates:

mean of x

1.17

> modelo<-aov(resp~trat)

> anova(modelo)

Analysis of Variance Table

Response: resp

Df Sum Sq Mean Sq F value Pr(>F)

trat 5 0.03733 0.00747 0.2941 0.91

Residuals 18 0.45700 0.02539

You might also like