0
$\begingroup$

Suppose LN(Y) is regressed on a matrix of binary variables and a continuous variable. How can the interactive effect of the continuous variable and each one of the binary variables be determined?

For example, suppose I attempt to estimate the effect of rainfall in a geographic area on the amount of vegetation in that area, having divided that geographic area into sections. How can I isolate the effect of rainfall on amount of vegetation in each one of those geographic sections?

$\endgroup$
1
$\begingroup$

Either do a separate regression analysis for all geographic sections using rainfall and amount of vegetation as independent and dependent variables; or build one (multilevel) regression model forcing 2-way interaction terms between rainfall and a series of dummy variables for each region (minus a reference region). In the latter case, the effect of rainfall on vegetation per region would then be expressed as the coefficient for rainfall plus the coefficient of the interaction term of the appropriate region's dummy (in the reference region the rainfall coefficient alone is the effect).

Note that both these options would require multiple measures per region. If this is indeed available, then within the regions there is bound to be some auto-correlation. This could also be modeled using a multilevel/random effects model. Although it will not give you clear estimates on the effect of rainfall for each section, adding a 'random slope' to such a model will estimate a mean effect of rainfall on vegetation (the coefficient) and a standard deviation across regions for the effect of rainfall on vegetation, taking into account auto-correlation.

$\endgroup$
1
$\begingroup$

The interaction term of any two variables is their product. This is true for two continuous, two binary, and one variable of each type. For categorical variables, first code them as a set of dummy or indicator variables, one for each df, the number of categories minus one. Then multiply all the indicator variables by a single continuous or categorical variable or by each of the indicator variables in another set.

Many statistical programs can do both steps automatically for you.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.