I have a dummy explanatory variable that indicates whether a subject responded "yes" to a question and then the sub-question response (on a continuous scale of 1 to 5) for those that said yes. Obviously for the ones that said "no" to the question, I have no sub question response data (as they were only asked to answer the sub-question if answered "yes"). How would I account for this in a regression?
1 Answer
I would suggest either $(1)$ breaking out the "yes" data into a separate regression to understand the effects of the continuous random variable $\in [1,5]$, or $(2)$ assigning $0$ values to all of the "no" responses, and running a regression from there (though this is not an ideal solution, to be sure).
Unfortunately, since you only have the continuous data for a subset of your respondents, it makes a straightforward answer a bit more difficult. You can run a regression on the subset, and then in your analysis write-up, preface the explanation with something like "For users who responded 'yes' to Question (a), simple linear regression found that [... relationship ...]".
-
$\begingroup$ Also, see this answer to a related question. Coded properly, you don't have to run separate regressions, just interpret appropriately the results of a single regression incorporating the dummy for having answered along with the continuous predictor. $\endgroup$– EdMCommented Jul 24, 2018 at 15:25
-
$\begingroup$ Thanks @EdM, that answer is very helpful, actually! Although, some may find it easier to interpret the results of separate regressions, especially in the case of writing an analysis for general consumption. $\endgroup$– ERTCommented Jul 24, 2018 at 15:27