Mr. Magdi Morsi Statistician Department of Research and Studies, MOH
SPSS Workshop Agenda Layout of the Program Adding Data to SPSS Preparing Data for Analysis Creating New Variables Descriptive Statistics Compare Means
Layout of the SPSS Program SPSS Program Windows Menus and Toolbars
SPSS Program Windows Data Editor Data View Variable View Output Viewer Syntax Editor File Types Data: filename.sav Output: filename.spv Commands: filename.sps Menus and Toolbars
Adding Data to SPSS Data Entry in the SPSS Data Editor Import from Excel
Other Ways to Load Data Data Entry in the SPSS Data Editor Import from Excel ◦ File Menu: Open ◦ Data ◦ In Open Data box, enter: C:\OMSB\Data_Excel.x ls ◦ Click OK for defaults
Preparing Data for Analysis Variable Formats Variable Labels Value Labels Missing Values
Creating New Variables Collapsing Variables Using Recode Computing Variables
Recoding Variables Recoding renumbers or collapses the values of a variable – Transform menu Recode into different variables – Highlight variable(s) and move over with arrow – Fill in a Name and Label for the new variable – Click Old and New Values
Recoding Variables – Specify the Old Value e.g., lowest through 29, 30 through 39, etc. – Specify a New Value e.g., 1 (for an A), 2(for a B), etc. – Click on the Add button – Repeat until all old and new values are specified – Old values can be defined as single values, ranges or missing values – Add value and variable labels, etc.
Computing New Variables Create new variables using equations or functions – Transform menu Compute Variable – Enter a Target Variable Name – e.g. BMI – Build a Numeric Expression E.g. wt/(ht/100)*(ht/100) – Click OK
Descriptive Data Analysis FREQUENCIES DESCRIPTIVES CROSSTABS Explore
The FREQUENCIES Procedure FREQUENCIES creates tables with counts of cases for each value of the variable Analyze Menu: ◦ Descriptive Statistics… Frequencies Highlight variables to create tables, click the arrow to add to variable list, then click OK Statistics, Chart and Format options are available
FREQUENCIES Output 1. Command syntax 2. Summary statistics 3. Variable values and corresponding labels 4. Frequency counts for each value 5. Percentages 1. Raw percent 2. Valid percents 3. Cumulative percents
The DESCRIPTIVES Procedure DESCRIPTIVES creates tables with summaries of values for variables Analyze Menu: – Descriptive Statistics… Descriptives Highlight variables to create tables, click the arrow to add to variable list, then click OK Options are available to choose different statistics
DESCRIPTIVES Output 1. Command syntax 2. Variable name and label 3. Number of cases 4. Statistics: Minimum Maximum Mean Standard Deviation
The CROSSTABS Procedure CROSSTABS displays the intersection of values of two or more variables Analyze Menu: – Descriptive Statistics… Crosstabs Highlight variables to create tables, click the arrow to add to Row, Column or Layer variable lists, then click OK Statistics, Cells and Format options are available
Crosstabs Output 1. Table title 2. Column variables 3. Row variables 4. Cell counts (# of cases) 5. Column percents (% of cases in column) 6. Statistics
Graphical Representation 1. Simple Bar Chart Simple bar chart is a pictorial from one variable frequency table. It is drown for categorized (nominal/ordinal) variables. Analyze Menu: Graphs… Bar Simple.. Define Highlight variable and transfer it to, Category Axis then click OK
Simple Bar Chart, cont.
2. Multiple bar( or Clustered bar)chart Analyze Menu: Graphs… Bar cluster.. Define Highlight variable and transfer it to, Category Axis then Define Clusters by then click OK
3. Pie chart It is another pictorial presentation of the distribution of a categorized variables. Analyze Menu: Graphs… Pie Summaries for groups of cases Define Slices by box Highlight variable and transfer it to, Category Axis then click OK
4. Histogram Histogram is a graphical representation of continuous frequency distribution (scale variable) which gives idea about the symmetry of the distribution. Analyze Menu: Graphs… Histogram Simple.. Define Highlight variable and transfer it to, Variables then click OK
5. Box plots (Whisker plots) Boxplots are away of summarizing a distribution of scores of group of individuals. The “box” in boxplot shows the median score as a line and the first quartile (25 th percentile) and third quartile( 75 th percentile) of the score distribution as a the lower and upper parts of the box. Boxplots are preferred when the study variable does not follow normal distribution pattern. Graphs… Boxplot Simple.. Define
7. Line Graph (Trend line) Simple line graph represents (ordinal) ungrouped frequency distribution. For drawing a line graph, the ordinal variable is taken along X-axis, the frequencies/measurements are taken along Y-axis and the corresponding plotted points are joined by straight lines to show the trend/pattern with respect to the ordinal variable. Graphs… Scatter/Dot.. Overlay Scatter Define
Test of Normality The assumption of normality is prerequisite for many inferential statistical techniques. We can explore this assumption Graphically by: - Histogram - Stem-and-leaf plot - Boxplot
Explore The Explore Descriptive table provides summary statistics for continuous, numeric variables. Analyze Menu: Descriptive Statistics… Explore Highlight variables to create tables, click the arrow to add to Dependent variable lists, then click OK Statistics, plots and options are available
Explore output 1. Mean 2. 95% Confidence Interval for Mean 3. 5% Trimmed Mean 4. Median 5. Variance 6. Std. Deviation 7. Minimum 8. Maximum 9. Range 10. Interquartile Range 11. Skewness 12. Kurtosis
Explore plots Stem-and-Leaf Plot Boxplot Histogram
Test of significant 1. Chi-square test for Association - used to test the significance of association between two categorized variables. Analyze Menu: Descriptive Statistics… Crosstabs Highlight variables to create tables, click the arrow to add to Dependent & Independent variable s, from statistics select chi square, then click OK If you can classify two variables as Dependent & Independent, transfer Independent in Column box & Dependent in Row box. Assumptions of Chi-square test: 1.Item or entity contribute s to only one cell. You cannot use chi-square on repeated measures design. 2.The expected frequencies should be greater than 5.
2. T-tests (compare means) A t-test is used to determine whether a set or sets of scores are from the same population. Three main types of t-test may be applied : One sample. Independent groups. Repeated measures. Assumption testing Assumption testing: The generic assumption underlying all types of t- test are: 1.Scale measurement 2.Random sampling 3.Normality
Analyze Menu: compare means…
one sample T test Analyze Menu: Compare mean… One sample t test Put test value Highlight variables to create tables, click the arrow to add
Independent sample T test Analyze Menu: Compare mean… Independent sample T test Highlight variables to create tables, click the arrow to add Select Grouping variable, then define Groups
Paired sample T test
THANK YOU