I am running a simple GLM with an interaction of the two main predictors.

The outcome (dependent) variable is binary and takes the value of 1 when the product is produced by a team. It takes the value of 0 (zero) when the product is not produced by a team.

The main predictor is tech and indicates the level of technology in the product on a continuous scale.

The mediating predictor is language and captures the extent to which team members on the product speak the same language. It is measured on a continuous scale.

I want to estimate the effect of technology on teamwork (0/1), mediated by language in the form of an interaction between technology and language. I have theoretical arguments that high technology scores requires high language scores.


  • Does it matter that language only has a score for teamwork = 1 and is missing for teamwork = 0?
  • Can I still meaningful interpret the interaction in the model
  • Is it possible to do a simple slope analysis using this set-up?

The model that I am looking at is defined as follows in R:

glm(teamwork ~ technology * language, data=df, family="binomial")

  • $\begingroup$ Have a look at this question and see if it answers your problem. $\endgroup$
    – Ben
    Oct 17, 2018 at 4:24
  • $\begingroup$ @Ben Your answer comes close. I will use your vocabulary here. My nested variable language has only a meaningful value for one type of outcome (when teamwork = 1). I believe that your answer speaks to the relationship between explanatory and nested variables. $\endgroup$
    – wake_wake
    Oct 17, 2018 at 14:23

1 Answer 1


Your question bears some superficial similarity to this question about nested variables, but in your case you have an observed nested variable that is nested within the response variable (you have language == NA for teamwork == 0 and language != NA for teamwork == 1 in your analysis). That makes the situation trivial, because it means that the language variable is coded with knowledge of the response variable, and it perfectly determines the response variable.

In this case there is no statistical inference at all, and your response variable is a deterministic function of the nested variable:

  • language == NA logically implies teamwork = 0,

  • language != NA logically implies teamwork = 1.

  • $\begingroup$ Thanks for getting in to this. If I understand your answer correctly, this means that I can't interact language with technology, right? I'm really interested in how language impacts the effect of technology on team-work. $\endgroup$
    – wake_wake
    Oct 17, 2018 at 21:00
  • $\begingroup$ The answer means that you wouldn't fit a statistical model in the first place --- once you know language you automatically know teamwork. $\endgroup$
    – Ben
    Oct 17, 2018 at 21:05
  • $\begingroup$ Right. But I am not interested in what explains teamwork. I am interested in how language (ranging from 0 to 100) influences the impact of technology (ranging from 0 to 100) on teamwork (0/1). I hypothesize that for advanced technologies, high language scores are needed for the product to become team-work... That is, the effect of technology on teamwork would be stronger if language scores are higher. Am I missing something here? Is my set-up completely wrong? Thanks Ben!! $\endgroup$
    – wake_wake
    Oct 17, 2018 at 21:33
  • 1
    $\begingroup$ It is unclear from your question what these variables actually mean, so I am taking you at your description of the values. With that in mind, in the present set-up, since language fully determines teamwork on its own, there is no other influence by any other variable. If you are looking to study an influence of this kind then you will need to formulate your variables in a way where language is not given NA values based on knowledge of teamwork. $\endgroup$
    – Ben
    Oct 17, 2018 at 21:38

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.