# How do I interpret the results from a basic interaction plot from the R effects package?

Using the method in this post, I have made a plot to visualize the interaction between two predictor variables using the effects package in , but I'm not really sure what I am looking at.

Tide heights and rain averages are continuous. 8 bins were the maximum the function would allow me to use. The following is the call to effect producing this plot:

 R > plot(effect(term="rain.avg2:tide.avg",mod=bkrain9.lm,default.levels=8),
main="", xlab="Precipitation - 24hr average (cm)",
ylab=expression("TCB Concentration - CFU*100m"*L^-1),multiline=TRUE)


Plot updated. Could somebody explain the purpose of this plotting feature in context to predictor interactions?

Background: For a class project, I have created a linear regression model to evaluate the effects of the interaction between two predictor variables (tide height and precipitation) on bacteria concentrations.

Thermo-tolerant coliform bacteria concentrations were sampled at 5 sites in a day, where a sample time was recorded at sampling completion. I took an average of these for roughly 20 days, and calculated an associated 24hr average of precipitation before sampling completion, and a 50 minute (the sampling duration) average of tide height before sampling completion.

-

## migrated from stackoverflow.comNov 16 '12 at 14:44

This question came from our site for professional and enthusiast programmers.

So I'm learning the ropes with this, but should I just flag my post for a moderator to do this? I'm guessing this is why I've received a down-vote. Thanks. –  shootingstars Nov 16 '12 at 12:52
To receive a helpful answer you should provide more info regarding your data and the analysis you have done so far. E.g. it seems that both predictor variables are continuous? Did you split up your data according two rain.avg2 in 8 bins for plotting purposes? –  jokel Nov 16 '12 at 15:10
Added more relevant information. I feel like I understand this a bit more after correcting which was the focal predictor and which was the non-focal predictor, but additional explanations are of course helpful. –  shootingstars Nov 17 '12 at 17:41
@patricksforscher pretty much gave you the answer -- the different lines correspond to the effect of 168 hour average precipitation on the TCB concentration when the tide.avg is held fixed at the values indicated in the legend. So the yellow line is how the TCB concentration changes as average precipitation changes and tide.avg is held constant at 125.46 –  T C Nov 17 '12 at 17:51
You might be interested in taking a look at the coplot() function and, more generally, John Fox's effects package. –  chl Nov 17 '12 at 20:38