0
$\begingroup$

After moving from a proprietary GUI-based software to python for GLM development, I find I'm confused on interpreting the output of an interaction. Using the statsmodel package, I've developed the following poisson GLM model with a log link function. The model is predicting frequency of insurance claims:

'frequency ~ atfault_model2 + majorvio_model2 + BIlmt_model2 + minorvio_model2 + Vintiles + multi_policy_count_model + unit_drv_exp_model2 + unit_value_model2 + yrs_owned_model2 + unitnum_model2 + class_model2_Sport + class_model2_Street + class_model2_other +  marital_status_model_S:Driver_Age_model - 1'

My question/s comes specifically from the marital status by age interaction. Marital status is coded as 1 (single) or 0 (married). Those are the only married options. Age is continuous variable from 18 to 81.

The married_status_S (1 for single) by age gives a coefficient of .0011. Is assume I interpret for every year a single person ages, that age goes up by exp(age*.0011).

Is that correct?

Second question, is based on the assumption that age will go up in terms of a coefficient for married status as well. How do I get that from the singleXage interaction or do I need to add driver age by itself as a factor?

$\endgroup$
2
  • $\begingroup$ To interpret the interaction you need to know a few things that you have not stated in your question. First, how is marriage coded? Is single coded as 0 and married as 1? What about other marital statuses (divorced, widowed, separated, cohabiting)? Second, what are the main effects for age and each level of marital status? Third, what is the model doing? Not all of us use Python. Is this an OLS regression? Poisson reg? Something else? $\endgroup$
    – Peter Flom
    Jan 13, 2020 at 12:46
  • $\begingroup$ Thanks @PeterFlom-ReinstateMonica . I have added more detail. $\endgroup$
    – Jordan
    Jan 13, 2020 at 13:03

1 Answer 1

1
$\begingroup$

No, this isn't correct.

Since marital status is coded as single = 1 and married = 0 then the effect of age is

  • For married people - the main effect of age
  • For single people - the main effect of age plus the interaction effect of age and marital status

Since you are doing Poisson regression, both these will be exponentiated (as you have in your question).

$\endgroup$
2
  • $\begingroup$ Thank you. But I don't have age as a variable by itself so am I understanding your answer to suggest I add that to see the main effect? $\endgroup$
    – Jordan
    Jan 13, 2020 at 13:10
  • $\begingroup$ Yes. The main effects should always be included when looking at an interaction. $\endgroup$
    – Peter Flom
    Jan 13, 2020 at 18:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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