Exercise

# Regression analysis with ggplot2

In the previous exercise, you saw how to add a superimposed scatter plot by adding `... + geom_point()`

. A **regression analysis** of the data, using the `lm`

method, can also be added in the same way:
```
... + geom_smooth(method = "lm")
```

The dataset `mydata100`

, the `gender`

factor, and the `pretest`

and `posttest`

continuous variables are pre-loaded in your workspace.

Instructions

**100 XP**

- Make a scatter plot of the
`pretest`

variable against the`posttest`

variable, specifying the shape of the points by the`gender`

factor and setting their size to`5`

. - Superimpose this plot with a regression analysis of the same data, specifying the line type again by the
`gender`

factor.