Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need some help, please use the R system to show me the code The table below gi

ID: 3066326 • Letter: I

Question

I need some help, please use the R system to show me the code

The table below gives the results of an experiment about the effect of salt in the soil on grass growth. The response values (Y) given in the table below are the grass emergence percentages for each plot. The four treatments considered were the levels of salt (0, 8, 16, and 24).

The experiment was done on three separate fields, so each field served as a separate block.

Salt Field   Emergence (Y)

---- -----   -------------

0      1       68                                                                                     

0      2       79                                                                                    

0      3       74                                                                                    

0      1       75                                                                                     

0      2       89                                                                                    

0      3       81                                                                                     

0      1       75                                                                                    

0      2       89                                                                                    

0      3       82                                                                                     

0      1       75                                                                                    

0      2       89                                                                                    

0      3       82                                                                                    

8      1       70                                                                                     

8      2       55                                                                                    

8      3       74                                                                                     

8      1       84                                                                                    

8      2       73                                                                                    

8      3       87                                                                                     

8      1       87                                                                                    

8      2       74                                                                                     

8      3       88                                                                                    

8      1       87                                                                                    

8      2       75                                                                                     

8      3       80                                                                                    

16     1       40                                                                                     

16     2       43                                                                                    

16     3       36                                                                                    

16     1       78                                                                                     

16     2       81                                                                                    

16     3       70                                                                                     

16     1       82                                                                                    

16     2       85                                                                                    

16     3       74                                                                                     

16     1       83                                                                                    

16     2       87                                                                                    

16     3       75                                                                                    

24     1       11                                                                                     

24     2       18                                                                                    

24     3       12                                                                                     

24     1       62                                                                                    

24     2       75                                                                                    

24     3       50                                                                                     

24     1       72                                                                                    

24     2       82                                                                                     

24     3       62                                                                                    

24     1       72                                                                                    

24     2       86                                                                                     

24     3       66

3. Write the R code. Verify the results obtained in part 1 with R output and be sure to include R output with your homework. The table question number 1 gives the results of an experiment about the effect of salt in the soil on grass growth. The response values (Y) given in the table below are the grass emergence percentages for each plot. The four treatments considered were the levels of salt (0, 8, 16, and 24). The experiment was done on three separate fields, so each field served as a separate block.

Explanation / Answer

r<-read.table("C:\Users\hp\Desktop\\attachments\dat.txt",header=TRUE)

r

summary(aov(Emergence~as.factor(Salt)+as.factor(Field),data=r))

Output

                Df Sum Sq Mean Sq F value Pr(>F)
as.factor(Salt)   3   4341 1447.0   4.605 0.00711 **
as.factor(Field) 2    247   123.3   0.392 0.67797
Residuals        42 13198   314.2                 
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1