Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- > dat = read.csv("stats.csv", header = TRUE)
- > head(dat)
- age ano sum c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 c16 c17 c18 c19 c20 c21 c22 c23 c24 c25
- 1 Entre 25 et 29 ans NON 125 1 4 4 4 4 4 4 4 2 4 4 4 5 4 4 4 5 4 4 4 4 4 2 2 4
- 2 Entre 25 et 29 ans NON 83 2 1 2 3 2 2 1 2 2 2 3 2 2 2 3 2 2 1 2 3 3 3 2 1 3
- 3 Entre 25 et 29 ans NON 167 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 4 5 5 5 3 3 5
- 4 Entre 21 et 24 ans NON 102 3 4 4 2 3 4 3 3 2 3 3 3 2 4 2 3 3 4 4 3 3 3 2 1 3
- 5 Entre 21 et 24 ans NON 110 4 4 4 2 4 4 3 2 2 5 3 4 4 5 2 2 2 5 2 5 4 4 1 1 2
- 6 Entre 21 et 24 ans NON 104 4 3 2 3 5 5 4 4 3 2 3 4 4 4 2 2 3 2 2 2 2 2 1 1 2
- c26 c27 c28 c29 c30 c31 c32 c33 c34 c35 c36 c37 c38 c39 c40 c41 c42
- 1 2 4 2 2 2 2 5 3 1 1 2 1 1 1 1 1 1
- 2 2 3 3 3 1 2 3 1 1 4 1 1 1 1 1 1 1
- 3 5 5 5 5 3 2 4 1 1 4 2 2 1 1 2 2 2
- 4 2 3 2 3 2 2 2 1 1 1 2 2 1 1 1 1 1
- 5 4 1 2 4 1 2 3 3 1 1 2 1 1 1 1 1 1
- 6 2 1 3 2 1 2 5 4 1 3 2 1 1 1 2 1 1
- > as.numeric(dat$ano)
- [1] 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2
- > lm1=lm(as.numeric(ano) ~ sum, data=dat)
- > aov(lm1)
- Call:
- aov(formula = lm1)
- Terms:
- sum Residuals
- Sum of Squares 0.799145 9.700855
- Deg. of Freedom 1 40
- Residual standard error: 0.4924646
- Estimated effects may be unbalanced
- > anova(lm1)
- Analysis of Variance Table
- Response: as.numeric(ano)
- Df Sum Sq Mean Sq F value Pr(>F)
- sum 1 0.7991 0.79915 3.2952 0.07699 .
- Residuals 40 9.7009 0.24252
- ---
- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
- >
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement