Biostat 510: Statistical Computing Packages

SAS Homework 7

Due Tuesday, March 22, 2005

Topics:

Read in data from a permanent SAS data set

Logistic regression using continuous variables

Logistic regression using dummy variables

Stepwise selection in a logistic regression

  1. Use your permanent SAS data set, LABDATA.AFIFI.
  2. Create a new dummy variable called DIED that has a value of 1 for those patients who died and a value of 0 for those who did not die. Remember, to create this new variable, you will need to create a new data set. It can be temporary or permanent, as you choose.
  3. Get a frequency tabulation for SURVIVE and DIED. Make sure that the number of people in each category of your new variable is correct.
  4. Get descriptive statistics for all variables in your data set for those who lived and those who died, using a Class Statement in Proc Means.
  5. Include this output in your homework.
  6. Use an appropriate statistical test to determine if there is a significant association between SHOKTYPE and DIED.
  7. What type of statistical test is appropriate here? Why?
  8. Report the results of your statistical tests. What do you conclude about the relationship between SHOKTYPE and DIED? (Hint: don't just say they are significantly related. Please discuss in terms of what this means).
  9. Include your SAS output for this question in your homework.
  10. Fit a logistic regression model to predict who will die, based on the SHOKTYPE categorical variable. Use SHOKTYPE in a class statement, with a reference variable coding for SHOKTYPE with Non-shock (the first category of SHOKTYPE) as the reference category.
  11. How many observations were included in this regression model? What is the model pseudo R2?
  12. What is the overall model significance? Include the likelihood ratio chi-square, the degrees of freedom and the p-value.
  13. Interpret each of the parameter estimates for each SHOKTYPE category. (Remember, the parameter estimates are on the logit scale!).
  14. Interpret the odds ratio for each of the SHOKTYPE categories. (Remember, the interpretation is one of a ratio of odds, not probabilities!)
  15. Include the logistic regression output in your homework write-up.
  16. Run another logistic regression to predict the probability of dying as a function of URINE1.
  17. How many observations were included in this regression model? What is the model pseudo R2? (Use the maximum rescaled R2 value).
  18. What is the overall model significance? Include the likelihood ratio chi-square, the degrees of freedom and the p-value.
  19. Please interpret the parameter estimate and the odds ratio for this predictor. Please explain this relationship in words.
  20. Include the output from this logistic regression in your homework.
  21. Run another logistic regression model to relate DIED to both SHOKTYPE and Urinary output at time 1 in the same model.
  22. What is the model pseudo R2?
  23. What is the overall significance of this model (for all variables)? Please report the LR chi-square test, the degrees of freedom and the p-value. Please explain the degrees of freedom in this test.
  24. What is the significance of SHOKTYPE and of URINE1 in this model?
  25. Include the logistic regression output for this model in your homework.
  26. Run another logistic regression model with DIED as the dependent variable and SHOKTYPE, URINE1, SBP1, DBP1, MAP1, CVP1, HEART1, BSA1, SEX AND AGE as potential predictors. Use stepwise selection to choose your model. Do not use the Details option for this model, because it will generate too much output.
  27. How many observations are included in this regression model? What is the model pseudo R2 for your final model?
  28. What is the overall significance of this model?
  29. Please include the table "Summary of Stepwise Selection" in your homework. Discuss what this table is showing.
  30. Include the table "Type 3 Tests of Effects" and the Table "Analysis of Maximum Likelihood Estimates". Annotate these tables and briefly discuss what they mean.
  31. Include and discuss the table "Analysis of Odds Ratio Estimates".
  1. Save your command file as homework7.sas. Make a printout of your commands and hand it in, along with selected appropriate output from SAS. Write up brief answers to each question. Make sure that your commands can run all at once, by simply clicking on the submit button, without selecting any commands.

1