Hello all,
I have what I believe should be a pretty simple problem but I'm getting tripped up, mostly because I'm not sure if there is a convention for coding this type of variable.
I am working with survey data. One of the questions is: "Are you registered in X country?" The options were: "Yes", "No" and "I am registered in another country". If they selected the "other" option, respondents were prompted to write in the other country.
Now in my dataset, I have two variables. The first is the registered variable with values 1 for "yes", 2 for "no", and blank if they chose "other" or if they just skipped the question. The second variable is the "other" variable, whose values are either the written response the respondents submitted, or blank. It is blank if either they answered Yes or No to the question (meaning the registered variable is not blank), or if they skipped the question entirely. Obviously, I want to be able to differentiate between blanks for having skipped the question and blanks for having answered the other part of it.
So my first question is, is there a convention for coding an "other" value? I would ideally like to have the registered variable be a simple 0/1 binary variable, but this "other" option is puzzling. It sort of makes sense to me to code it as 0, because I assume if the respondent chose that option, they are not indeed registered in Country X (I acknowledge this was probably a badly written question to begin with). But then how will I differentiate between the 0s from "no" and the 0s from "other"? Should I code it as a missing value for that first variable? Should I just code that variable as 1/2/3?
The second part of my question is how then to code the "Other" variable. I will leave the written responses as string values, but how do I separate the blanks due to skipping from the blanks due to a Yes or No response?
I hope this question makes sense, thanks in advance for any help!
Related Posts with Coding variables with options "Yes" "No" and "Other"
Panel Data - Basic linear regression using large accounting datasetHi all, I am a beginner to Stata and from watching videos can get a grasp of basic OLS, probit mode…
Regression with grouped variablesDear Stata Community In my paper, I want to investigate the impact of import competition on the inc…
HelpDear Statalists, I am doing a model with fixed-effects and need some help. Would maybe any of you b…
Interrupted time series analysis with differing effect on specific subgroupsHi, I would like to perform an interrupted-time-series analysis to assess the impact of a policy on…
Testing for serial correlation.Hey guys! I am running a fixed effects regression and wanted to test for serial correlation. I used …
Subscribe to:
Post Comments (Atom)
0 Response to Coding variables with options "Yes" "No" and "Other"
Post a Comment