add_resid function

Add residuals of different types to dataframe