Docsity

Biostat 510 Homework 9: Data Analysis using SPSS - Prof. Kathleen B. Welch, Assignments of Biostatistics

Toggle sidebar
bg1
Biostat 510
Homework 9
Due Tuesday, April 10, 2007
1. Create an SPSS data set from the raw data file, afifi.dat, on my web page. Please
do this using syntax. Remember that you have two records (2 rows of raw data)
per person in this file. You can get the data description for the Afifi data at the
end of this homework assignment, along with starter commands for reading in the
raw data and creating new variables.
a) You should read in all variables.
b) Create value labels for SHOKTYPE, SEX, and SURVIVE. Check the
coursepack for information on the meaning of each shock type.
c) Create new variables:
i. SHOCK: Dummy Variable: 0=no shock 1=shock, and assign value
labels to this variable.
ii. DIED: Dummy Variable: 0=lived 1=died, and assign value labels
to this variable.
iii. SHOCK_DUM2 - SHOCK_DUM7: Dummy variables for each
shock type (shock types go from 2 through 7).
iv. SBPDIFF: The difference between SBP at time2 and SBP at time1.
Calculate by subtracting SBP1 from SBP2.
2. Get a table of simple descriptive statistics for all variables in the data set. Include
this output in your writeup.
3. Get oneway frequency tables for SHOKTYPE, SHOCK, SURIVE, DIED, and
SEX. Include these tables in your writeup. The value labels should appear in the
output.
4. Get a histogram of SBP1 for those who died and did not die.
a) Make the histogram so we can see the distribution of SBP1 separately for
those who died and did not die (use SURVIVE as the Row variable in the
histogram).
b) Include the histograms in your writeup.
5. Carry out an independent samples t-test to compare the means of SBP1 and
SBPDIFF for those who lived and those who died. Include the output from these
t-tests in your writeup.
6. Carry out a paired t-test to compare the mean of SBP1 vs. SBP2 for all patients.
Redo this paired t-test separately for those who lived and those who died. Include
the output from these tests in your writeup.
1
pf3

Partial preview of the text

Download Biostat 510 Homework 9: Data Analysis using SPSS - Prof. Kathleen B. Welch and more Assignments Biostatistics in PDF only on Docsity!

Biostat 510

Homework 9

Due Tuesday, April 10, 2007

  1. Create an SPSS data set from the raw data file, afifi.dat, on my web page. Please do this using syntax. Remember that you have two records (2 rows of raw data) per person in this file. You can get the data description for the Afifi data at the end of this homework assignment, along with starter commands for reading in the raw data and creating new variables. a) You should read in all variables. b) Create value labels for SHOKTYPE, SEX, and SURVIVE. Check the coursepack for information on the meaning of each shock type. c) Create new variables: i. SHOCK: Dummy Variable: 0=no shock 1=shock, and assign value labels to this variable. ii. DIED: Dummy Variable: 0=lived 1=died, and assign value labels to this variable. iii. SHOCK_DUM2 - SHOCK_DUM7: Dummy variables for each shock type (shock types go from 2 through 7). iv. SBPDIFF: The difference between SBP at time2 and SBP at time1. Calculate by subtracting SBP1 from SBP2.
  2. Get a table of simple descriptive statistics for all variables in the data set. Include this output in your writeup.
  3. Get oneway frequency tables for SHOKTYPE, SHOCK, SURIVE, DIED, and SEX. Include these tables in your writeup. The value labels should appear in the output.
  4. Get a histogram of SBP1 for those who died and did not die. a) Make the histogram so we can see the distribution of SBP1 separately for those who died and did not die (use SURVIVE as the Row variable in the histogram). b) Include the histograms in your writeup.
  5. Carry out an independent samples t-test to compare the means of SBP1 and SBPDIFF for those who lived and those who died. Include the output from these t-tests in your writeup.
  6. Carry out a paired t-test to compare the mean of SBP1 vs. SBP2 for all patients. Redo this paired t-test separately for those who lived and those who died. Include the output from these tests in your writeup.
  1. Create a Scatterplot with SBP2 as the Y-axis, and SBP1 as the X-axis. Include a linear regression line in your scatterplot. Include your scatterplot in your homework.
  2. Carry out a simple linear regression, with SBP2 as the dependent variable, and SBP1 as the only predictor. a) Get a plot of residuals vs. predicted values to check homogeneity of variance. b) Get a histogram and normal P-P plot to check the normality of the residuals. c) Save the Unstandardized Predicted values, Unstandardized Residuals, and Studentized Deleted Residuals as new variables (using the Save… button at the bottom of the Regression Window). d) Include your regression output and the diagnostic plots in your homework.
  3. Get a box plot of SBP2 as the Y-axis and the levels of SHOCKTYPE as the Category axis. Include the box plot in your homework.
  4. Carry out a regression with the dummy variables for SHOCKTYPE as the predictors and SBP2 as the dependent variable. a) Use Non-shock as the reference category. b) Get a plot of residuals vs. predicted values to check homogeneity of variance. c) Get a histogram and normal P-P plot to check the normality of the residuals. d) Include your regression output and the diagnostic plots in your homework.
  5. Create a Pearson correlation matrix with the variables SBP2, SBP1, BSA1, CARDIAC1, HGB1, and MAP1. a) Use listwise deletion for the variables. b) Create a scatterplot matrix for these variables. c) Include the correlation matrix and the scatterplot matrix in your homework output.
  6. Carry out a multiple regression with SBP2 as the dependent variable and the predictor variables, SBP1, BSA1, CARDIAC1, HGB1, and MAP1 as predictors. a) Check the collinearity diagnostics for this model. b) Include the model output, along with the collinearity diagnostics in your homework. c) Rerun the model, but remove MAP1 as a predictor. d) Check collinearity for this new model. e) Include both of these linear regression outputs in your homework. Include diagnostic plots only for the second model in your homework. Save your homework commands as Homework9.sps. Run all the commands at once and be sure they all work without error. You are not required to write up any of these results. However, if you wish, a brief writeup of the results for all of these questions will be worth 25 points in extra credit. Please make your output look nice, and include your SPSS commands as the first part of your homework.