Question: Write a program in R that fits and interprets a regression model to the smiles.csv data. Your program should do the following (though not necessarily
Write a program in R that fits and interprets a regression model to the smiles.csv data. Your program should do the following (though not necessarily in order):
1. Produce a boxplot of leniency score for the various types of smiles
2. Fit the regression model that treats "neutral" as the reference level of type and perform a test of the equality of the means of the levels of type
3. Estimate the population-level mean leniency score for the levels of type with their standard errors
4. Estimate all differences in population-level mean leniency scores for the levels of type with their standard errors
5. Produce an effects plot of the effect of the levels of type on leniency score
| type | leniency |
| felt | 7 |
| felt | 3 |
| felt | 6 |
| felt | 4.5 |
| felt | 3.5 |
| felt | 4 |
| felt | 3 |
| felt | 3 |
| felt | 3.5 |
| felt | 4.5 |
| felt | 7 |
| felt | 5 |
| felt | 5 |
| felt | 7.5 |
| felt | 2.5 |
| felt | 5 |
| felt | 5.5 |
| felt | 5.5 |
| felt | 5 |
| felt | 4 |
| felt | 5 |
| felt | 6.5 |
| felt | 6.5 |
| felt | 7 |
| felt | 3.5 |
| felt | 5 |
| felt | 3.5 |
| felt | 9 |
| felt | 2.5 |
| felt | 8.5 |
| felt | 3.5 |
| felt | 4.5 |
| felt | 3.5 |
| felt | 4.5 |
| FALSE | 2.5 |
| FALSE | 5.5 |
| FALSE | 6.5 |
| FALSE | 3.5 |
| FALSE | 3 |
| FALSE | 3.5 |
| FALSE | 6 |
| FALSE | 5 |
| FALSE | 4 |
| FALSE | 4.5 |
| FALSE | 5 |
| FALSE | 5.5 |
| FALSE | 3.5 |
| FALSE | 6 |
| FALSE | 6.5 |
| FALSE | 3 |
| FALSE | 8 |
| FALSE | 6.5 |
| FALSE | 8 |
| FALSE | 6 |
| FALSE | 6 |
| FALSE | 3 |
| FALSE | 7 |
| FALSE | 8 |
| FALSE | 4 |
| FALSE | 3 |
| FALSE | 2.5 |
| FALSE | 8 |
| FALSE | 4.5 |
| FALSE | 5.5 |
| FALSE | 7.5 |
| FALSE | 6 |
| FALSE | 9 |
| FALSE | 6.5 |
| miserable | 5.5 |
| miserable | 4 |
| miserable | 4 |
| miserable | 5 |
| miserable | 6 |
| miserable | 3.5 |
| miserable | 3.5 |
| miserable | 3.5 |
| miserable | 4 |
| miserable | 5.5 |
| miserable | 5.5 |
| miserable | 4.5 |
| miserable | 2.5 |
| miserable | 5.5 |
| miserable | 4.5 |
| miserable | 3 |
| miserable | 3.5 |
| miserable | 8 |
| miserable | 5 |
| miserable | 7.5 |
| miserable | 8 |
| miserable | 4 |
| miserable | 5.5 |
| miserable | 6.5 |
| miserable | 5 |
| miserable | 4 |
| miserable | 3 |
| miserable | 5 |
| miserable | 4 |
| miserable | 4 |
| miserable | 6 |
| miserable | 8 |
| miserable | 4.5 |
| miserable | 5.5 |
| neutral | 2 |
| neutral | 4 |
| neutral | 4 |
| neutral | 3 |
| neutral | 6 |
| neutral | 4.5 |
| neutral | 2 |
| neutral | 6 |
| neutral | 3 |
| neutral | 3 |
| neutral | 4.5 |
| neutral | 8 |
| neutral | 4 |
| neutral | 5 |
| neutral | 3.5 |
| neutral | 4.5 |
| neutral | 6.5 |
| neutral | 3.5 |
| neutral | 4.5 |
| neutral | 4.5 |
| neutral | 2.5 |
| neutral | 2.5 |
| neutral | 4.5 |
| neutral | 2.5 |
| neutral | 6 |
| neutral | 6 |
| neutral | 2 |
| neutral | 4 |
| neutral | 5.5 |
| neutral | 4 |
| neutral | 2.5 |
| neutral | 2.5 |
| neutral | 3 |
| neutral | 6.5 |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
