Published online by Cambridge University Press: 01 April 2011
What numbers should I assign for dichotomous or ordinal variables in my analysis?
Let's take the simplest case of a dichotomous variable based on an interview question: Do you have a history of diabetes: yes or no?
The equations used to solve multivariable analysis need numerical representations of yes and no. Since this scale only has two points, the numeric distance between the two points can be represented by any two numbers that are separated by one: 0 and 1, 1 and 2, 0 and –1, etc. It doesn't really matter. The sign of the coefficient may change depending on whether you assign “yes” the higher or the lower value, but the coefficient and significance level will be the same (Section 8.3). However, you will not get the same answer if you code your variables such that there is more than one point between the two numbers. For example, coding schemes like +1 and −1 will give you a different answer because there is more than one unit between the two points.
Although any two numbers that are one number apart will give you the same answer, a sensible convention, for both independent and dependent variables, is to use 1 and 0, with 1 representing the presence and 0 representing the absence of the condition. This convention is easy to remember and decreases the chance that you will be confused at the direction of the effect.
To save this book to your Kindle, first ensure no-reply@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
Find out more about the Kindle Personal Document Service.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.