intro spss

Upload: hrishikeshanand

Post on 04-Jun-2018

229 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 Intro Spss

    1/12

    1

    Center for Teaching, Research & Learning

    Social Science Research Lab

    American University, Washington, D.C.

    http://www.american.edu/provost/ctrl/

    202-885-3862

    Introduction to SPSS

    SPSS is one of the most widely used programs for statistical analysis in social science.

    Course ObjectiveThis course is designed to give a basic understanding of how SPSS works and how to run

    simple statistical analysis of data.

    Learning Outcomes1. Understanding the layout and interface of SPSS2. Introducing the main menus3. Opening and creating new datasets4. Analyzing data using descriptive statistics

    1.Layout and Interface: Data Editor, Syntax Editor, and Output ViewerSPSS consists of three parts:

    The Data Editor The Syntax Editor Output Viewer

    When you start SPSS, the Data Editor window opens by default.

    The Data and Variable Editors

    The Data Editor allows you to create your data set and perform statistical operationsinteractively, using pull-down menus. The Data Editor window has two sheets:

    http://www.american.edu/provost/ctrl/http://www.american.edu/provost/ctrl/
  • 8/13/2019 Intro Spss

    2/12

    2

    By default the Data View opens whenever you open the Data Editor. It contains your actualdata set. Here, the variable names are displayed in the grey row right above line 1. Each white

    row represents a case, and each column represents a variable.

    SPSSS Data Viewer

    The Variable View allows you to name your variables, to identify missing values, assignvariable and value labels etc.

    Tip: You can move between The Data and Variable Views by using the tab on the bottom of thescreen.

  • 8/13/2019 Intro Spss

    3/12

  • 8/13/2019 Intro Spss

    4/12

    4

    Tip: SPSS cannot perform statistical functions on data stored as strings.

    Width: Tells the computer how much space each case needs to take up. This is measured incharacters. Thus a width for country means that country names can be no longer than 12

    letters long.

    Decimals: Tells the computer how many decimals to display. If you do not want to see adecimal point at all enter a zero here.

    Labels: This column is useful for explaining what the variable is measuring. You may usespaces here.

    Values: These allow you to display certain labels depending on the data in each case. In theexample below all countries with a 1 in this variable will display OECD in the Data View. These

    labels will also appear in tables and graphs that you create.

    Tip: Labels can be hidden/revealed in the Data view by clicking on this button at the top of theSPSS window.

  • 8/13/2019 Intro Spss

    5/12

    5

    Tip: String variables are automatically set as Nominal.Tip: Frequently data sets from the internet do not have their variables set correctly.

    The Syntax Editor and Output ViewerThe Syntax Editor fulfills the same function as the Data Editor. However, there are a couple ofreasons why you should be aware of SPSS syntax even if you may plan to primarily use the

    dialog boxes. For one, not all procedures are available through the dialog boxes and you

    should be aware of the Syntax Editor so that you can save procedures as syntax to be rerun at

    a later date.

    The dialog boxes available through the pull-down menus have a button labeled Paste which willprint the syntax for the procedure you are running in the dialog box environment to the Syntax

    Editor.

  • 8/13/2019 Intro Spss

    6/12

    6

    To open the syntax editor go to FIL > New > Syntax

    The Output Viewer displays the results of statistical operations you perform on your data. Itpops up automatically once you run a statistical procedure.

    2.Important Menu CommandsTake a look at the menu bar. There are several pull-down menus. The most important ones are

    the following:

    The Data MenuThe Data menu provides techniques for defining variables, inserting variables or cases, sorting

    files, splitting files, merging data sets, aggregating data, or using a select command to look at a

    subgroup within the data file. For more about this see the SPSS Data Management Tutorial.

    The Transform MenuThe Transform menu allows you to transform your data set on the basis of existing variables.

    Among other things, you can recode your variables and compute new variables from existing

    ones. For more about this see the SPSS Data Management Tutorial.

    The Analyze MenuWith the Analyze menu you perform statistical operations on your data set, the output of which

    will be displayed in the Output Viewer. In this tutorial we will be exploring descriptive statistics

    using this menu. For more information about other statistical functions, see the SPSS Bivariate

    Statistics and Regression tutorials.

    The Graphs MenuThe Graphs menu contains a number of graph options that allow you to visually display

    descriptive statistics in the Output Viewer. For more information about this see the SPSS

    Graphing Tutorial.

  • 8/13/2019 Intro Spss

    7/12

    7

    3.Opening and Creating a DatasetIf you already have a SPSS dataset, you can open it in the following way:

    1. Select the File pull-down menu > Open > Data. A dialog box pops up.2. Browse for your dataset and open it. (use world95.sav)

    If you have a dataset in Excel, it is easy to open it in SPSS.

    1. Select the File pull-down menu > Open > Data. A dialog box pops up. In the line thatspecifies Files of Type, change the file type from SPSS to Excel.

    2. Browse for your dataset and open it. (use demo.xls)You can also create a dataset from scratch in the Data Editor:Now, lets enter the datafor this survey.

    1. Go to the Variable View sheet and specify your variables.a. In row one (the first variable):b. In name, type agec. In type, choose numeric (this will usually be either numeric or string/text)d. Width: 2 characters (width of 2people in this class are probably all less than 100)e. Decimals: 0 (age is reported in whole years)f. Label: respondent age (the variable name is limited in that you cannot use spaces.

    The variable label allows you to give more information about variables)

    g. Values: select none. You would only include values if each number means somethingmore than a number. We will talk about this more momentarily)

  • 8/13/2019 Intro Spss

    8/12

    8

    h. Measure: select scale. Age is scale variable. There is an order but there is a possibleinfinite number of possibilities. Other common scale variables include income, GDP,

    adult literacy rate.

    2.

    In row two (the second variable)a. Name: Collegeb. Type: string (string means that there is text being used, not numbers)c. Width: 5 (KOGOD has 5 letters is the longest college name)d. Label: College of respondente. Measure: Nominal

    3. In row three, we are going to save the college information in a different way. This time, wewill assign numbers to the various college (1=SIS, 2=SPA, 3=CAS, 4=KOGOD, 5=SOC)

    4. Name: Collegenum (you cant have two variables with the same name and no spaces)a. Type Numericb. Width: 1c. Decimals: 0d. Label: College of respondent, codede. Click on Values

    o In the value box, enter 1. In the label box, enter SIS. Click addo Continue with SPA, CAS, KOGOD, and SOCo Click OK

    f. Measure: Nominal. This is a nominal variable. A nominal variable is a variable in whichthe data values represent something else.While SIS=1 and SPA=2, this does not mean

    that SIS is better than SPA or vice versa. That is, the numbers mean something but the

    order isnt important.

    5. Return to the Data View sheet and enter your data, one case per line.

    6. Save your data by selecting the File pull-down menu and using the Save option.

  • 8/13/2019 Intro Spss

    9/12

    9

    4.Running descriptive statistics and frequencies Descriptive statistics

    To run descriptive statistics, go to Analyze > Descriptive Statistics > Descriptives

    Select the variables for which you want the descriptives. To specify the kind of descriptives you want, click on the Options button. Then click OK. The results will be displayed in the Output Editor. You can get the mode in the frequencies section. Lets do this for the age and collegenum

    variables.

    Standard DeviationThe standard deviation is a measure of dispersion that is calculated based on the values of the

    data. It allows us to see how widely the data are dispersed around the mean. The standard

    deviation has the desirable property that, when the data are normally distributed, 68.3 % of the

  • 8/13/2019 Intro Spss

    10/12

    10

    observations lie within +/- 1 standard deviation from the mean, 95.4% within +/- 2 standard

    deviations from the mean and 99.7 % within 3 standard deviations from the mean.

    Skewness and KurtosisTo state that the data are normally distributed simply means that the distribution of the dataresembles a bell shaped curve; in such a case, most of the 10 observations are clustered around

    the mean. In reality, it is rare to find data that is perfectly normally distributed but they might appear

    to be somehow close to a normal distribution. Two statistics will help us determine whether this is

    the case.

    SkewnessSkewness is a measure of whether the peak is centered in the middle of the distribution. A positive

    value means that the peak is off to the left, and a negative value suggests that it is off to the right.

    KurtosisKurtosis is a measure of the extent to which data are concentrated in the peak versus the tail. A

    positive value indicates that data are concentrated in the peak; a negative value indicates that data

    are concentrated in the tail.

    FrequenciesTo run frequencies, go to Analyze > Descriptive Statistics > Frequencies

    Select the variables for which you want the frequencies. To specify more options, click on the charts and format buttons. To get descriptive statistics along with the frequencies, you can click on the Statistics

    button.

    Then click OK. The results will be displayed in the Output Editor.

    Lets do this for the age, college, and collegenum variables

  • 8/13/2019 Intro Spss

    11/12

    11

    The MeanThe mean is defined as the sum of a series of observations divided by the number of observations

    in the series. It is commonly used to describe the central tendency of variables.

    The MedianA limitation of the mean as an indicator of central tendency is that its value is greatly affected when

    a few observations have very large or very low values. The median is the middle value in a series

    of values. It is the observation that divides the sample into two sub-samples of the same size. The

    median should always be used when your sample contains a relatively small number of

    observations and/or when a few very largeor smallvalues affect estimates of the mean.

    The ModeThe mode is defined as the most frequent value of a variable. This indicator might convey more

    information about the central tendency of a series when variables have certain values that aremuch more frequent than the others.

    Tip: For nominal variables, the mode is more meaningful that the mean.

    You can also create histograms through the Frequencies Window.

  • 8/13/2019 Intro Spss

    12/12

    12

    HistogramsHistograms show the number of observations in each category. They are very useful because they

    give a quick visual of the central tendency, the extent of dispersion, and also whether any

    unusually large or small observations are present.

    Exporting your outputTo export outputs, go to File > Export.

    A dialog box pops up. Specify the type of output you want to export from the Export drop-down menu.

    Specify your file destination and name in the File Name box. Specify your file type from the File Type

    drop-down menu. You can export the outputs in Html, Text, Excel, Word, and PowerPoint format. Then

    click OK.

    If you only want one or two tables or charts, you can select them in the output viewer and pressCTRL C.

    You can then paste these into a word processor. If youre doing this inMS Office you will want to use

    Paste Special.

    In Office 2007 this can be found in the Home Tab by clicking on the arrow under Paste button.

    You will want to paste your table as an Enhanced Metafile. This will paste your tables into yourdocument in anaesthetically pleasing and readable manner.