[R] How to explain interaction variable in Linear regression?

Weidong Gu anopheles123 at gmail.com
Wed Nov 23 21:32:02 CET 2011


Hi,

The significant interaction between A (continous) and B (categorical)
means that the slopes of Y in relation to A are different for classes
of B. Since your categorical B was binary, the default reference class
(B2) was intecept, and the slope of A for (B2) was 0.0017799. However,
the slope of A for another class (B1) was 0.0017799+0.0059008. The
test shows that the slopes were significantly different.

HTH

Weidong

On Wed, Nov 23, 2011 at 12:20 PM, Chen Xiu
<chenxiu.worldwide at googlemail.com> wrote:
> Hello everyone,
>
> Recently, I faced a problem on explanatory of *Interaction variable* in
> Linear Regression, could anyone give me some help on how to explain that?
>
> the response variable Y is significantly correlated with *Interaction
> variable X* which is consisted of Continuous predictor A and Categorical
> predictor B. The Categorical predictor B has two factors B1 (value=1) and
> B2 (value=0). The result is as follows:
>
> Call:
> lm(formula = Y ~ ... + *A:B*, data = ..., na.action = na.omit)
>
> Residuals:
>     Min       1Q   Median       3Q      Max
> -0.84267 -0.29877  0.01961  0.32187  0.98519
> Coefficients:
>                                 Estimate     Std. Error      t value
> Pr(>|t|)
> (Intercept)                0.7699265    0.5129588     1.501     0.1408
> BB1                          -0.6657700   0.2668956    -2.494     0.0166 *
> A                              0.0017799   0.0007569     2.352     0.0235 *
> ...                             0.2393929   0.2334615     1.025     0.3110
> ...                            -0.3877065   0.2317213     -1.673    0.1017
> *BB1:A                      0.0059008  0.0025522   2.312   0.0257 **
> ---
> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
>
> Residual standard error: 0.4379 on 42 degrees of freedom
> Multiple R-squared: 0.2813,    Adjusted R-squared: 0.1958
> F-statistic: 3.288 on 5 and 42 DF,  p-value: 0.01354
>
> *My questions:*
>
>   1. *How to explain the result of BB1:A correlated with Y? since BB1 is
>   only one factor of B, and if it is combined with A, how does the
>   combination mean?*
>   2. *Can I  believe the significance of either single BB1 or A? Why?*
>
> Thank you in advance for any possible help!
>
> Chen,
>
> a beginner in R and statistics
>
>  --
> Chen Xiu
>
> Guest Fellow/ PhD Student
> Department of Conservation Biology
> UFZ - Helmholtz Centre for Environmental Research
> Permoserstr. 15
> D-04318 Leipzig
> Germany
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list