Labels

Learn the powerful enterprise adaptable database:

Getting Started With ADABAS & Natural

Wednesday, January 30, 2013

SPSS-Summary Statistics Using Frequencies




Summaries of individual variables provide an important "first look" at your data. Some of the tasks that these summaries help you to complete are listed below.

•  Determining "typical" values of the variables. What values occur most often? What range of values are you likely to see?

• Checking the assumptions for statistical procedures. Do you have enough observations? For each variable, is the observed distribution of values adequate?

•  Checking the quality of the data. Are there missing or mis-entered values? Are there values that should be recoded?

The Frequencies procedure is useful for obtaining summaries of individual variables. The following examples show how Frequencies can be used to analyze variables measured at nominal, ordinal, and scale levels.


Using Frequencies to Study Nominal Data
==============================


You manage a team that sells computer hardware to software development companies. At each company, your representatives have a primary contact. You have categorized these contacts by the department of the company in which they work (Development, Computer Services, Finance, Other, Don't Know).

1) Running the Analysis

This information is collected in contacts.sav.

► To run a Frequencies analysis, from the menus choose:
Analyze > Descriptive Statistics > Frequencies...



► Select Department as an analysis variable.
► Click Charts.



► Select Pie charts.
► Click Continue.
► Click OK in the Frequencies dialog box.



These selections generate the following command syntax:
FREQUENCIES
 VARIABLES=dept
 /PIECHART
 /ORDER=  ANALYSIS .

• The procedure produces a frequency table and pie chart for the variable dept.

2) Pie Chart

A pie chart is a good visual tool for assessing the relative frequencies of each category.




At a glance, you see that the plurality of your contacts work in the computer services departments of their respective companies, followed by those in the financial and development departments.

3) Frequency Table

The frequency table shows the precise frequencies for each category.

The Frequency column reports that 30 of your contacts come from the computer services department.





This is equivalent to 42.9% of the total number of contacts and 48.4% of the contacts whose departments are known.




You can also see that the departmental information is missing for 11.4% of your contacts.





4) Bar Chart

A bar chart, ordered by descending frequencies, quickly helps you to find the mode and also to visually compare the relative frequencies.




► To obtain an ordered bar chart, recall the Frequencies dialog box.
► Click Charts.


► Select Bar charts.
► Click Continue.
► Click Format in the Frequencies dialog box.





► Select Descending counts.
► Click Continue.
► Click OK in the Frequencies dialog box.



These selections generate the following command syntax:
FREQUENCIES
 VARIABLES=dept
 /FORMAT=DFREQ
 /BARCHART
 /ORDER=  ANALYSIS .

• The procedure produces a bar chart with the categories ordered by descending frequency.


Again, you see that the plurality of contacts come from computer services departments.






Using Frequencies to Study Ordinal Data
=============================



In addition to the department of each contact, you have recorded their company ranks. Use Frequencies to study the distribution of company ranks to see if it meshes with your goals.

1) Running the Analysis

► To summarize the company ranks of your contacts, from the menus choose:
Analyze > Descriptive Statistics > Frequencies...



► Click Reset to restore the default settings.
► Select Company Rank as an analysis variable.
► Click Charts.


► Select Bar charts.
► Click Continue.
► Click Format in the Frequencies dialog box.



► Select Descending values.
► Click Continue.
► Click OK in the Frequencies dialog box.


These selections generate the following command syntax:
FREQUENCIES
 VARIABLES= rank
 /FORMAT=DVALUE
 /BARCHART
 /ORDER=  ANALYSIS .

• The procedure produces a frequency table and bar chart with the categories ordered by descending value.

2) Frequency table

The frequency table for ordinal data serves much the same purpose as the table for nominal data. For example, you can see from the table that 15.7% of your contacts are junior managers.



However, when studying ordinal data, the Cumulative Percent is much more useful. The table, since it has been ordered by descending values, shows that 62.7% of your contacts are of at least senior manager rank.



3) Bar chart

As long as the ordering of values remains intact, reversed or not, the pattern in the bar chart contains information about the distribution of company ranks. The frequency of contacts increases from Employee to Sr. Manager, then decreases somewhat at VP, then drops off.


Using Frequencies to Study Scale Data
===========================

For each account, you've also kept track of the amount of the last sale, in thousands. You can use Frequencies to study the distribution of purchases.


1) Running the Analysis


► To summarize the amounts of the last sales, from the menus choose:
Analyze > Descriptive Statistics > Frequencies...




► Click Reset to restore the default settings.
► Select Amount of Last Sale as an analysis variable.
► Deselect Display frequency tables.





► Click OK in the warning dialog box.
It is a good idea to turn off the display of frequency tables for scale data because scale variables usually have many different values.
► Click Statistics in the Frequencies dialog box.



► Check Quartiles, Std. deviation, Minimum, Maximum, Mean, Median, Skewness, and Kurtosis.
► Click Continue.
► Click Charts in the Frequencies dialog box.



► Select Histograms.
► Select With normal curve.
► Click Continue.
► Click OK in the Frequencies dialog box.



These selections generate the following command syntax:
FREQUENCIES
 VARIABLES=sale
 /FORMAT=NOTABLE
 /NTILES=  4
 /HISTOGRAM= NORMAL
 /STATISTICS=STDDEV MINIMUM MAXIMUM MEAN MEDIAN
SKEWNESS KURTOSIS
 /ORDER=  ANALYSIS .

• The procedure produces a table of statistical summaries and a histogram for Amount of Last Sale.
• FORMAT suppresses the Frequency tables, which are not useful for continuous variables.


2) Statistics table

The statistics table tells you several interesting things about the distribution of sale, starting with the five-number summary.



The center of the distribution can be approximated by the median (or second quartile) 20.25, and half of the data values fall between 12.0 and 52.875, the first and third quartiles.




Also, the most extreme values are 6.0 and 776.5, the minimum and maximum.


The mean is quite different from the median, suggesting that the distribution is asymmetric.


This suspicion is confirmed by the large positive skewness, which shows that sale has a long right tail. That is, the distribution is asymmetric, with some distant values in a positive direction from the center of the distribution. Most variables with a finite lower limit (for example, 0) but no fixed upper limit tend to be positively skewed.

The large positive skewness, in addition to skewing the mean to the right of the median, inflates the standard deviation to a point where it is no longer useful as a measure of the spread of data values.

The large positive kurtosis tells you that the distribution of sale is more peaked and has heavier tails than the normal distribution.


3) Histogram

The histogram is a visual summary of the distribution of values. The overlay of the normal curve helps you to assess the skewness and kurtosis.



Summarizing transformed data
======================

Many statistical procedures for quantitative data are less reliable when the distribution of data values is markedly non-normal, as is the case with Amount of Last Sale. Sometimes, a transformation of the variable can bring the distribution of values closer to normal.

1) Transforming the Data

► To transform the variable sale, from the menus choose:
Transform > Compute Variable...


► Type logsale as the Target Variable.
► Type LN(sale) as the Numeric Expression.
► Click OK.

The log transformation is a sensible choice because Amount of Last Sale takes only positive values and is right skewed.

► Recall the Frequencies dialog box.
► Deselect sale as an analysis variable.
► Select logsale as an analysis variable.
► Click OK.


These selections generate the following command syntax:
COMPUTE logsale = ln(sale).
EXECUTE.

FREQUENCIES
 VARIABLES=logsale
 /FORMAT=NOTABLE
 /NTILES=  4
 /HISTOGRAM=NORMAL
 /STATISTICS=STDDEV MINIMUM MAXIMUM MEAN MEDIAN
SKEWNESS KURTOSIS
 /ORDER=  ANALYSIS .

2) Statistics table

From the statistics table, it appears that the transformation has brought the distribution closer to normal. The skewness and kurtosis are greatly reduced, and the mean and median are much closer together.


The histogram is also much closer to the normal curve.



Summary
=======
You have assessed the distributions of the departments and company ranks of your contacts and the amounts of last sales. After seeing that the distribution of sales is highly skewed, you found that the log-transformed sales are more viable for further analysis.

Related Procedures
==============

•  The Descriptives procedure focuses specifically on scale variables and provides the ability to save standardized values (z scores) of your variables.

•  The Crosstabs procedure allows you to obtain summaries for the relationship between two categorical variables.

•  The Means procedure provides descriptive statistics and an ANOVA table for studying relationships between scale and categorical variables.

•  The Summarize procedure provides descriptive statistics and case summaries for studying relationships between scale and categorical variables.

•  The OLAP Cubes procedure provides descriptive statistics for studying relationships between scale and categorical variables.

•  The Correlations procedure provides summaries describing the relationship between two scale variables.



Recommended Readings
==================
See the following texts for more information on summarizing data:
Hays, W. L. 1981. Statistics, 3rd ed. New York: Holt, Rinehart, and Winston.

Norusis, M. 2004. SPSS 13.0 Guide to Data Analysis. Upper Saddle-River, N.J.: Prentice Hall, Inc..

Norusis, M. 2004. SPSS 13.0 Statistical Procedures Companion. Upper Saddle-River, N.J.: Prentice Hall, Inc..

Tuesday, January 29, 2013

SPSS - Chart Creation Basics



You can create and edit a wide variety of chart types.

1) To demonstrate the basics of chart creation, we will create a bar chart of mean income for different levels of job satisfaction. This example uses the data file demo.sav.
► From the menus choose:
Graphs > Chart Builder...

2) The Chart Builder dialog box is an interactive window that allows you to preview how a chart will look while you build it.


► Click the Gallery tab if it is not selected.

3) The Gallery includes many different predefined charts, which are organized by chart type. The Basic Elements tab also provides basic elements (such as axes and graphic elements) for creating charts from scratch, but it's easier to use the Gallery.
► Click Bar if it is not selected.

4) Icons representing the available bar charts in the Gallery appear in the dialog box. The pictures should provide enough information to identify the specific chart type.

5) If you need more information, you can also display a ToolTip description of the chart by pausing your cursor over an icon.



► Drag the icon for the simple bar chart onto the "canvas," which is the large area above the Gallery. The Chart Builder displays a preview of the chart on the canvas. Note that the data used to draw the chart are not your actual data. They are example data.

6) Although there is a chart on the canvas, it is not complete because there are no variables or statistics to control how tall the bars are and to specify which variable category corresponds to each bar. You can't have a chart without variables and statistics.

7) You add variables by dragging them from the Variables list, which is located to the left of the canvas.

8) When you drag the variables, the targets are "drop zones" on the canvas. Some drop zones require a variable while others do not.

9) The drop zone for the x axis is required. The variable in this drop zone controls where the bars appear on the x axis.



10) Depending on the type of chart you are creating, you may also need a variable in the y axis drop zone. For example, when you want to display a summary statistic of another variable (such as mean of salary), you need a variable in the y axis drop zone. Scatterplots also require a variable in the y axis. In that case, the drop zone identifies the dependent variable.


11) You are going to create a chart that shows bars for the mean income of each job satisfaction category, so both drop zones are needed. There will be a categorical variable on the x axis and a scale variable on the y axis for calculating the mean.

12) A variable's measurement level is important in the Chart Builder. You are going to use the Job satisfaction variable on the x axis. However, the icon (which looks like a ruler) next to the variable indicates that its measurement level is defined as scale. To create the correct chart, you must use a categorical measurement level. Instead of going back and changing the measurement level in the Variable View, you can change the measurement level temporarily in the Chart Builder.



► Right-click Job satisfaction in the Variables list and choose Ordinal. Ordinal is an appropriate measurement level because the categories in Job satisfaction can be ranked by level of satisfaction. Note that the icon changes after you change the measurement level.


► Now drag Job satisfaction from the Variables list to the x axis drop zone.



13) The y axis drop zone defaults to the Count statistic.

14) If you want to use another statistic (such as percentage or mean), you can easily change it. You will not use either of these statistics in this example, but we will review the process in case you need to change this statistic at another time.

► Click Element Properties to display the Element Properties window.


15) The Element Properties window allows you to change the properties of the various chart elements. These elements include the graphic elements (such as the bars in the bar chart) and the axes on the chart. Select one of the elements in the Edit Properties of list to change the properties associated with that element.

16) Also note the red X located to the right of the list. This button deletes a graphic element from the canvas.

17) Because Bar1 is selected, the properties shown apply to graphic elements, specifically the bar graphic element.

18) The Statistic drop-down list shows the specific statistics that are available. The same statistics are usually available for every chart type. Be aware that some statistics require that the y axis drop zone contains a variable.

19) Return to the Chart Builder dialog box and drag Household income in thousands from the Variables list to the y axis drop zone.


20) Because the variable on the y axis is scalar and the x axis variable is categorical (ordinal is a type of categorical measurement level), the y axis drop zone defaults to the Mean statistic. These are the variables and statistics you want, so there is no need to change the element properties.

21) You can also add titles and footnotes to the chart.
► Click the Titles/Footnotes tab.

► Select Title 1.


22)The title appears on the canvas with the label T1.

► In the Element Properties window, select Title 1 in the Edit Properties of list.

► In the Content text box, type Income by Job Satisfaction. This is the text that the title will display.


► Click Apply to save the text. Although the text is not displayed in the Chart Builder, it will appear when you generate the chart.
► Click OK to create the bar chart.

23) The bar chart reveals that respondents who are more satisfied with their jobs tend to have higher household incomes.