For example, in the dummy variable for Female, all cases in which the respondent is female are coded as 1 and all other cases, in which the respondent is Male, are coded as 0. Each dummy variable represents one category of the explanatory variable and is coded with 1 if the case falls in that category and with 0 if not. Dummy VariablesĪ dummy variable is a variable created to assign numerical value to levels of categorical variables. We can avoid this error in analysis by creating dummy variables. This would provide us with results that would not make sense, because for example, the sex Female does not have a value of 2. So, if we were to enter the variable sex into a linear regression model, the coded values of the two gender categories would be interpreted as the numerical values of each category. However, linear regression assumes that the numerical amounts in all independent, or explanatory, variables are meaningful data points. The codes 1 and 2 are assigned to each gender simply to represent which distinct place each category occupies in the variable sex. However, before we begin our linear regression, we need to recode the values of Male and Female. We want to perform linear regression of the police confidence score against sex, which is a binary categorical variable with two possible values (which we can see are 1= Male and 2= Female if we check the Values cell in the sex row in Variable View).
Does sex influence confidence in the police?