--- title: "Assignment: linear regression" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` # Salaries for Professors `Salaries` dataset from `carData` library contains the 2008-09 nine-month academic salary for Assistant Professors, Associate Professors and Professors in a college in the U.S. The data were collected as part of the on-going effort of the college's administration to monitor salary differences between male and female faculty members. # Exercise 1 Investigate the relationship between experience measured as years of service (`yrs.service`) and salary (`salary`) using linear regression. Visualize, interpret and describe the results. ```{r} # Your code here ``` *Your answer here* # Exercise 2 Fit two separate linear models to the data - one for males and another for females. Compare the results. What can you conclude from the results? ```{r} # Your code here ``` *Your answer here* # Exercise 3 Use diagnostic plots to evaluate your models from the first two exercises (all three models separately). Interpret the results. Does the data satisfy the assumptions of the linear regression? ```{r} # Your code here ``` *Your answer here*