OK, I made an error in simulating the IncomeIntel.txt dataset. I just updated that dataset in the repo, and it should be fixed. The new scatterplot should look like the following.

Because these data are not panel data, you cannot use differencing or log differencing methods to detrend them. The solution here is to:
- Treat the first year of the data
grad_year=2001 equal to the base year.
- Calculate the average growth rate in salary by:
- Calculate the mean salary each year
avg_inc_by_year = IncomeIntel['salary_p4'].groupby(IncomeIntel['grad_year']).mean().values
- Calculate the average growth rate in salaries across all 13 years
avg_growth_rate = ((avg_inc_by_year[1:] - avg_inc_by_year[:-1]) / avg_inc_by_year[:-1]).mean()
- Divide each salary by
(1 + avg_growth_rate) ** (grad_year - 2001). This means that all grad_year=2001 salaries will not change. All grad_year=2003 salaries will be divided by (1 + avg_growth_rate) ** 2. And all grad_year=2013 salaries will be divided by (1 + avg_growth_rate) ** 12.
OK, I made an error in simulating the

IncomeIntel.txtdataset. I just updated that dataset in the repo, and it should be fixed. The new scatterplot should look like the following.Because these data are not panel data, you cannot use differencing or log differencing methods to detrend them. The solution here is to:
grad_year=2001equal to the base year.(1 + avg_growth_rate) ** (grad_year - 2001). This means that allgrad_year=2001salaries will not change. Allgrad_year=2003salaries will be divided by(1 + avg_growth_rate) ** 2. And allgrad_year=2013salaries will be divided by(1 + avg_growth_rate) ** 12.