# Trouble fitting a simple linear regression

I have been trying to do a simple linear regression of x3=Weeks Claimed against x4=Weeks compensated. I am having problems because my residual standard error is very high and also my residuals are not homoscedastic. If anyone could provide some guidance on how to fix these problems I would really appreciate it.

Here is the output from R.

Thanks!!

There's a clear division of your data into two groups - the small group at the low end of weeks claimed for whom weeks compensated exceeds weeks claimed, and everyone else, for which weeks compensated is less than weeks claimed (to see this neat separation, draw in the y=x line on your first plot; the line goes neatly between the two point clouds).

If you have some indicator variable which explains/describes/predicts the situation in which people can be compensated for more weeks than they claim (i.e. that identifies which people it will be without looking at their weeks compensated), it should neatly serve as a predictor in your regression to pull those people's residuals nicely in alignment. Failing that, some good proxy for whatever is causing that should help.

Edit:

I see from comments that these are observations from early in the study. If you can identify by time when people stopped being in the situation of being paid more weeks than claimed (more specifically identify when the cause of that ceased to be present), that would serve as the basis for a suitable dummy.

It may be an artifact of misalignment of what's included in the two counts (if you claim before you are paid, and no claims or payments before a particular date are considered), or it may be a change in policy or procedures (in which case the date should be known).

Your standard errors are not large relative to the size of the variables (in the 10,000 - 50,000 range). The main issue is the heteroscedasticity. This is being driven by the small set of points at the low end of Weeks Claimed. This does not seem like a statistical problem, but a need to further understand the problem. I would identify these observations and see whether they are different and whether that difference can be captured by some other variables in your data.

On a different note, are your variables well coded? 50,000 weeks seem like a long time (like millennium).

• Thanks Hernan! I'll have a look at that set of points now get back to you when I think I've figured out why this trend is occurring. The data is a cumulative figure of weeks claimed from a large pool of insurance applicants which is why the number is so large thanks for noticing that though! Commented Apr 21, 2014 at 11:57
• Ok I think I've figured out where this trend is coming from. The data I am analysing is monthly data from 1961 to 1994 and this set of points with abnormally large residuals is coming from the data very early during the time frame. I don't know what to do from here though unfortunately... Commented Apr 21, 2014 at 12:03
• I recommend that you exclude them from your regression and re-run the analysis. There is nothing wrong with excluding observations from an analysis if you (1) justify the exclusion and report it in detail and (2) show that excluding these observations does not affect your results substantively. If these data points come from a specific period of time, you can also add a dummy variable to capture this source of variation. Commented Apr 21, 2014 at 12:09
• Thanks Hernan I will do that! I have marked your answer correct now. I am unsure how to do the dummy variable method though. Will it be very difficult if I have never tried it before? Otherwise I will just exclude the data points as you said. Commented Apr 21, 2014 at 12:15
• Just add another variable that is either zero everywhere, except the time period that you want to control for. Make sure that you have a good reason to justify this (e.g. some structural change, different measurement, other regulations). Run the regression with this extra variable x4 ~ x3 + x5, where x5 is the dummy variable. Commented Apr 22, 2014 at 6:34

Eventually, you could also run a quantile regression in order to understand what happens at some specific quantiles. This should help to better understand the phenomenon you are studying.

• Thanks for your advice! I'm unsure how to do a quantile regression unfortunately. However as I just told Hernan I have noted that that outlying group at the left side of the residual plot is coming from data near the start of the time frame I am studying (1961 to 2004). However I don't know how to interpret this finding. Commented Apr 21, 2014 at 12:06