Logistic regression is a variation of ordinary regression which is used when the dependent (response) variable is a dichotomous variable. A dichotomous variable takes only two values, which typically represents the occurrence or nonoccurrence of some outcome event and are usually coded as 0 or 1 (success).
The example dataset below was taken from the well-known Boston housing dataset. The information in this dataset was gathered by the US Census Bureau from census tracts within the Boston area. Each of the features (or variables) describes a characteristic impacting the selling price of a house.
To run a logistic regression:
- On the XLMiner Analysis ToolPak pane, click Logistic Regression
- Enter C1:C40 for Input Y Range. This is the output variable.
- Enter A1:B40 for Input X Range. These are the predictor variables.
- Keep "Labels" selected since the first row contains labels describing the contents of each column.
- If "Constant is Zero" is selected, there will be no constant term in the equation. Leave this option unchecked for this example.
- Select Confidence Level 95%.
- Enter F1 for the Output Range.
- Click OK.
The results are below.
Using these results, the regression model can be written as: Median Value of Owner Occupied Home = 0.98 – 29.68 * CRIM – 1.484 * ZN. For a more detailed explanation of these results, see any standard statistics reference text.