The University of North Carolina at Pembroke
Logistic Regression

Due Tuesday sect.: April 24 or
Thursday sect.: April 19

1. Open the JMP IN dataset JMP IN data\Spring.jmp
2. Create a new variable called Dummy Rained which will be 1 if Rained = "Rainy" and 0 if Rained = "Dry"
1. To do this, double click on the column head to the right of the last column.
2. Replace Column 15 with the variable name Dummy Rained.
3. Right click on the column head and click on Formula.
4. Type in the following formula exactly: if(Rained=="Rainy",1,0) The quotation marks are important and so is the double equal sign.  There are no periods in this formula--only commas.
5. Click on the OK button.
3. Analyze the model using linear regression.  To do this,
1. Click on Analyze, then Fit Model.
2. Highlight Dummy Rained and click on the Y button.
3. Highlight Temp, Humid1:pm, and Pressure and click on the Add button.
4. Click on the Run Model button.
4. Which regressors appear to be determining whether the day is rainy?  What pattern do you see in Residual by Predicted plot?  Does it seem that the model is linear?  Save the residuals and run the Shapiro-Wilk test on them (recall that that test is under the Distribution tool).  Can we believe that the residuals come from a normal distribution?  What is the effect of a 4-point increase in Pressure on the dependent variable?  (use alpha = 0.08,  Yes, that is a bit large)
5. Analyze the model using logistic regression.  To do this,
1. Click on Analyze, then Fit Model.
2. Highlight Rained and click on the Y button.
3. Highlight Temp, Humid1:pm, and Pressure and click on the Add button.
4. Click on the Run Model button.
5. When the report window appears, click on the red triangle for the pop-up menu and click on Likelihood Ratio Tests.
6. Which regressors appear to be determining whether the day is rainy?  What is the p value for the whole model?  What is the logit R²?  Does the lack of fit test indicate that more variables need to be added to the model?  What is the effect of a 4-point increase in Pressure on the probability that the day was rainy?
7. Given the differences between the model results, which model should we believe?