Question: Create a dummy variable Townhouse, where it is equal to 1 when Typeequals=Townhouse and 0 otherwise. Add a column titled Townhouse in column D of
Create a dummy variable Townhouse, where it is equal to 1 when Typeequals="Townhouse" and 0 otherwise. Add a column titled "Townhouse" in column D of the spreadsheet to enter the values for the dummy variable. The function =IF(A2="Townhouse",1,0) could be used to find the value of this dummy variable in cell D2 for the first row of data
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
