GettingStartredwithSPSS 17 PartI 200908

download GettingStartredwithSPSS 17 PartI 200908

of 27

Transcript of GettingStartredwithSPSS 17 PartI 200908

  • 7/29/2019 GettingStartredwithSPSS 17 PartI 200908

    1/27

    Page1of27

    GETTING STARTED with SPSS - Part I

    SPSS (originally named Statistical Package for the Social Sciences is a widely usedsoftware package for performing statistical analyses and generating graphical displays. It

    is one of the oldest packages in the retail market, having begun as a small deck of punchcards in 1968. It is designed to accommodate the statistical computing needs of socialscientists, but is increasingly used by analysts from other disciplines as well. Recently,IBM announced that it is purchasing SPSS for $1.2 billion. With version 18, which hasrecently been released, the product name has changed to PASW (Predictive AnalyticSoftware). SPSS 17 windows version is compatible with Windows Vista. Appendix Aprovides more details on system requirements for SPSS/PASW 17 and PASW 18 forWindows, MAC and Linux. Additional information may be found on the SPSS, Inc.website:http://www.spss.com.

    SMU's Standard Configuration for SPSS 17:

    SMUs standard configuration for an SPSS installation isSPSS Base, Regression AnalysisandAdvanced Models. SMU also has a limited number of licenses available forTables,Tables Original, Trends, Trends Original, Categories, Exact Tests, Conjoint, MissingValuesandAmos. Software installation requests may be made by calling the SMU HelpDesk at x84357 (x8HELP) or online athttp://www.smu.edu/help/support/itshelpdesk.asp(click on Online Support Center). For assistance with statistical analyses or use ofstatistical software packages, contact N. Shirlene Pearson [email protected].

    Topics covered in Getting Started with SPSS 17 -- Part I: Overview of the Data Editor Bringing data into SPSS SPSS data file structure Variable profiles Working with multiple data sources Summary statistics for categorical data Creating and editing charts Exporting output SPSS Syntax

    Invoking SPSS.SPSS can be invoked by clicking on the desk top SPSS icon or via the Start Menu byselecting

    Program Files SPSSInc Statistics 17.0 SPSS 17.0.

  • 7/29/2019 GettingStartredwithSPSS 17 PartI 200908

    2/27

    Page2of27

    SPSS Statistics Data Editor

    Upon opening, SPSS displays itsData Editor window, which has two tabs at the bottom:Data ViewandVariable View. The tab of the current view is highlighted in yellow.

    Data Viewis where the actual data isdisplayed. Data values may be entered oredited within Data View.

    Variable View is where variableproperties are displayed. These propertiesmay be created before entering data ormodified afterward within Variable View.

    The menus across the top of the DataEditor window remain the same

    regardless of which view is selected andconsist of: File, Edit, View, Data,Transform , Analyze, Graphs, Utilities,Add-ons, Window, and Help.

    Note: For some reason, there are two Add-ons buttons in SPSS 17 on my PC. One isactive and the other is inactive. This does not appear to be the case for other PCs runningSPSS 17.

    TheFile,Edit andView menus are similar to what you might expect to find in otherapplications.

    TheDatamenu allows you to manipulate your dataset by using tools designed for thispurpose. You can easily transpose, sort, split your file, etc.

    TheTransformmenu enables you to transform the values of one or more variables

    according to a set of rules, so you do not have to manually change individual data values.This is where you can, for example, replace all missing values with some other specifiedvalue, recode variables to create new ones, or create a new variable from a computingoperation performed on one or more variables.

    TheAnalyzemenu allows easy access to the core SPSS functionality that is installed.This menu contains all available non-graphical statistical analyses and will varydepending on the particular SPSS configuration you have installed.

  • 7/29/2019 GettingStartredwithSPSS 17 PartI 200908

    3/27

    Page3of27

    Statistics in SPSS Base include:

    Descriptive statistics: cross tabulation, frequencies, descriptives, explore,descriptive ratio statistics

    Bivariate statistics: means, t-tests, ANOVA, correlation (bivariate, partial,distances), nonparametric tests Prediction for numerical outcomes: linear regression Prediction for identifying groups: factor analysis, cluster analysis (two-step, K-

    means, hierarchical), discriminant analysis

    TheGraphsmenu, as the name implies, provides tools for generating and customizing awide variety of graphical displays. Customized graphics can be stored as templates forfuture use with other datasets.

    TheUtilitiesmenu provides tools for more efficiently working with your datasets and for

    running saved SPSS scripts.

    TheAdd-onsmenu provides an overview of SPSS modules and packages that may bepurchased separately from SPSS Base. Most of these add-ons require that you have SPSSBase installed. Modules not installed on your computer will appear in the Add-ons menu.Modules that are installed will show up in the Analyze menu, but not the Add-ons menu.

    TheWindow menu allows you to split the active Data View window into either two orfour panes for navigating the dataset. This enables you to view up to four different areasof the dataset at the same time. This option is not available in Variable View, and isgrayed-out in Variable View. From this menu, you can also minimize all windows or

    select any active window that may be open.

    TheHelp menu provides informationAbout the currentlyinstalled version, tutorials, documentation, and a link to Checkfor Updates. This latter choice is a convenient way todetermine whether your installation needs patches that may beavailable. It even has aStatistics Coachto help guide you inyour choice of analyses. SPSS Base installed software containsall add-ons that require SPSS Base, but none of the add-ons areactivated without an activation code and your registering theadd-on with SPSS. This is accomplished within the Help menu

    by selectingProduct Registration.

    Bringing Data into SPSS.

    There are three principle ways that data may be brought into SPSS: direct data entry,reading data from a data file or reading data from a database.

  • 7/29/2019 GettingStartredwithSPSS 17 PartI 200908

    4/27

    Page4of27

    Data entry data may be entered manually into Data View or copy/cut and pasted fromother applications such as other SPSS datasets, Excel spreadsheets, etc. However, thecopy/cut and paste method is not fool-proof and you should take care that the data istransferred properly.

    Reading from a data file SPSS supports the importation of data from a variety of fileformats: SPSS (*.sav, *.sys, *.por), Systat (*.syd, *.sys), Excel (*.xlm, *.xlsx, *.xlsm),Lotus (*.w*), Sylk (*.slk), dBase (*.dbf), SAS (*.sas7bdat, *.sd7, *.sd2, *.ssd01, *.xpt),Stata (*.dta), and Text (*.txt, *.dat).

    Reading from a database SPSS also supports the importation of data from databasessuch as dBase and MS Access Database, as well as any database on your computer thatuses ODBC (Open Database Connectivity) drivers, such as FoxPro Database, FoxProTables, Xtreme Sample Database, Microsoft SQL Server, XLS, Text, xBase, Paradox,ODS, Oracle, RedISAM, FoxBase, Btrieve, Integra-SQL, DEC Rdb, SQLBase, Informix,Ingres, DB2, SQL/DS, Teradata, SQL/400, et al.

    Open an SPSS Data File demo.sav file located in the SPSS Samples directory

    SPSS provides a wealth of example data in eleven (11) different languages. Thesesamples are installed as part of the base package and are located inc:\ProgramFiles\SPSSInc\Statistics17\Samples. The English samples are in the subdirectory English:

    c:\Program Files\SPSSInc\Statistics17\Samples\English

    In the File menu Open Data

    AnOpen Datawindow appears.

    Click on My Computer and navigate to the SPSS Statistics17 Samples directory

  • 7/29/2019 GettingStartredwithSPSS 17 PartI 200908

    5/27

    Page5of27

    C drive

    ProgramFiles

    SPSSInc

    Statistics17

    Samples

    English

    demo.sav

    ClickOpenWhen opening a data file, two windows appear: SPSS DataEditor (above) andSPSS Viewer (below). Results from runningstatistical procedures are shown in SPSS Viewer -- tables, graphsor text (including script commands).

    Read data from an Access database: demo.mdb file in the SPSS Samples directory.

    In the File menu Open DatabaseNew Query

    An ODBC Driver Login window appears.Type the path to the database to open, orclick browse and proceed as before withopening data files. Select datasetdemo.mdb.

    A Database Wizard Welcomedialog box

    appears. Select MS Access Databases.Click Next.

  • 7/29/2019 GettingStartredwithSPSS 17 PartI 200908

    6/27

    Page6of27

    A Database Wizard dialog box opens with aSelect Datawindow allowing you to selectthe tables and variables you want to import from the Available Tables panel on the left-hand side. If all you see is thedemo table, then click on the "+" inside the box next to itto view all available variables (fields) in the dataset (table).

    Select all available by highlighting the database namedemoat the top of the list and clickthe add button with the arrow pointing to the right. Your selections will appear in theRetrieve Fieldspanel on the right-hand side. You may deselect individual fields byclicking on them and then clicking the deselect arrow pointing to the left. When you arefinished selecting variables and tables, click theNextbutton at the bottom of the window.

    A Limit Retrieved Caseswindows opens in which you may select the records (cases) toimport. If you only want toimport a subset of the

    records in the database, youmay specify a rule or set ofrules for extracting thesubset. You can also opt toselect a random samplefrom the database. If youwant all data imported, thenselect no options in thiswindow.

    Click Next to continue.

    A Define Variableswindow allows you to editthe variableNameandData

    Typebefore importing. A Recode to Numericbox will appear next to string variables.By checking this box, string variable values will be recoded to integer values while

  • 7/29/2019 GettingStartredwithSPSS 17 PartI 200908

    7/27

    Page7of27

    retaining the original string values as labels. Click the Recode to Numeric next toGender.

    Click Next to continue.

    The SQL statement created from yourselections in the Database Wizard appears inthe Results window. This SQL command canbe executed now or saved for later use. Toexecute it now, click theFinishbutton to

    retrieve the data.

    All of the data in the Access databasethat you selected to import now appearin an SPSS Data Editor window.

    SPSS Data File Structure.SPSS data files structure assumes thatvariables are arranged in columns andindividual cases (records) in rows, and can be viewed through the Data View window inData Editor. This tabular format is the typical arrangement for most statistical packages.The names of the variables appear as headers of each column. If not supplied, SPSS willprovidedefault variables namesVARxxxxx, where xxxxx is a sequentially specified

  • 7/29/2019 GettingStartredwithSPSS 17 PartI 200908

    8/27

    Page8of27

    number with leading zeroes beginning with VAR00001, VAR00002, and so on. SPSSalso provides row numbers along the left-hand margin of the table.

    Variable Profiles.

    SPSS provides for storage, specification and editing of variable attributes. This enablesyou to fully document your variables and provide labels for display purposes. InternallySPSS is designed to act on numbers. SPSS recommends that you encode all characterdata with numbers, usually integers. Variable profiles are viewed and edited in theVariable View window and include up to10 variable attributes for each variable: Name,Type, Width, Decimals, Label, Values, Missing, Columns, AlignandMeasure. Theseattributes are listed as column headers in Variable View.

    The name and other attributes of each variable appear across rows, with one row pervariable.

    When creating a variable in Variable View (and in the absence of data), SPSS uses adefault profile: Name (if not specified, will use default VARxxxxx), Type =numeric,Width =8, Decimals =2, Labels (blank), Values =None, Missing =None, Columns =8,Align =Right, Measure =Scale.

    When entering data values into Data View without first specifying the variable attributes,SPSS will create anassumed profilebased on the first data value entered. For example,if the first data value is all letters, then SPSS assumes that the variable is string.

    Variable Name.

    Like most statistical software packages, SPSS has constraints on the structure of variablenames. These constraints include not only those created within Data Editor, but thoseimported with datasets from other sources. Care should be taken when transferring datafrom one software package format into another, as naming conventions vary, and what isallowed in one format may not be allowed in another.

    SPSS variable naming rules are:

    1.The default variable name is a prefix VAR and a sequential 5-digit number(VAR00001, VAR00002, etc.)

    2. Name lengths cannot exceed 8 characters.3. Names must begin with a letter. Remaining characters may be any letter, any

    digit, or the symbols @, #,_, or $.4. Variables cannot end in a period.5. Blanks and special characters (e.g. !, ?. , and *) are not allowed.6. Each variable name must be unique; duplication is not allowed.

  • 7/29/2019 GettingStartredwithSPSS 17 PartI 200908

    9/27

    Page9of27

    7. Variable namesare notcase sensitive. The names VAR0001, Var00001 andvar0001 are identical to SPSS.

    8. Certain keywords cannot be used as variable names: ALL, AND, BY, EQ, GE,GT, LE, LT, NE, NOT, OR, TO, WITH.

    Open a new Data Editorwindow.

    In File menu New DataIn Window menu notice 3 windows appear at the bottom: two SPSS Data Editors(demo.sav and Untitled) and one SPSS Viewer. Output from each of the Data Editoranalyses will be displayed in the (single) SPSS Viewer in the order in which they aregenerated, so output may be interleaved.

    Variable Type.

    The Windows version of SPSS provides for creation of eight commonly used data types,but will allow additional types to be imported from other applications. These eight typesare: numeric, comma, dot, scientific notation, date, dollar, custom currencyandstring.In the new Data Editor, click on a cell under the column titledTypein Variable View,and click on the button that appears in the cell. SPSS automatically creates a defaultprofile and aVariable Typewindow appears. Within this window, you may select thevariable type and adjust related options. Numeric, comma, dot, scientific notation, dollar

    and custom currency options are width anddecimal places. Many date format optionsare available. String has only one option --the number of characters.

    Variable input formats determine how rawdata is stored and output formats determinehow data is displayed. For numeric, comma,and dot formats, you can enter values with

    any number of decimal positions (up to 16),and the entire value is stored internally.

    The Data View displays only the definednumber (as specified in Variable View) ofdecimal places and rounds values with

    more decimals. However, the completevalue for these data types is used in allcomputations.

    Numeric A variable whose values arenumbers, can include a leading +or -,

  • 7/29/2019 GettingStartredwithSPSS 17 PartI 200908

    10/27

    Page10of27

    and adecimal indicator. The default decimal indicator is a period ".", but othersymbols can be chosen for this indicator. The maximum width is 40 characters, andthe maximum number of decimal places is 16.

    Comma A numeric variable whose values are displayed with commas delimiting

    every three places and displayed with the period as a decimal delimiter. The DataEditor accepts numeric values for comma variables with or without commas or inscientific notation. Values cannot contain commas to the right of the decimalindicator.

    Dot A numeric variable whose values are displayed with periods delimiting everythree places and with the comma as a decimal delimiter. The Data Editor acceptsnumeric values for dot variables with or without periods or in scientific notation.Values cannot contain periods to the right of the decimal indicator.

    Scientific Notation A numeric variable whose values are displayed with an

    embedded E and a signed power-of-10 exponent. The Data Editor accepts numericvalues for such variables with or without an exponent. The exponent can be precededby E or D with an optional sign or by the sign alone--for example, 123, 1.23E2,1.23D2, 1.23E+2, and 1.23+2.

    Date A numeric variable whose values are displayed in one of several calendar-dateor clock-time formats. Select a format from the list. You can enter dates with slashes,hyphens, periods, commas, or blank spaces as delimiters. The century range for two-digit year values is determined by your Options settings (from the Edit menu, chooseOptions, and then click the Data tab). Internally, dates are stored as the number ofseconds from October 14, 1582.

    Prior to 1582, every year divisible by 4 was a leap year. Since a yearcontains only 365.242199 days (slightly less than 365.25 days), an error often days accumulated over the centuries. To compensate for this error,Pope Gregory XIII (after whom the Gregorian Calendar is named) decreedthat the ten days between October 5, 1582 and October 14, 1582 would beeliminated from the calendar. This made October 1582 the shortest month,with only 21 days. After 1582, years divisible by 100 arenot leap yearsunlessthey are also divisible by 400. Thus, 1900 isnot a leap year, but2000 is.

    Perpetual Calendar byHerb Weiner,http://www.wiskit.com/calendar.html

    Dollar A numeric variable displayed with a leading dollar sign ($), commasdelimiting every three places, and a period as the decimal delimiter. You can enterdata values with or without the leading dollar sign.

    Custom Currency A numeric variable whose values are displayed in one of thecustom currency formats that you have defined on the Currency tab of the Options

    http://www.wiskit.com/users/herbwhttp://www.wiskit.com/users/herbw
  • 7/29/2019 GettingStartredwithSPSS 17 PartI 200908

    11/27

    Page11of27

    dialog box. Defined custom currency characters cannot be used in data entry but aredisplayed in the Data Editor.

    String A variable whose values are not numeric and therefore are not used incalculations. The values can contain any characters up to the defined length.

    Uppercase and lowercase letters are considered distinct. This type is also known as analphanumeric variable. All values are right-padded to the maximum width. For astring variable with a maximum width of three, a value of No is stored internally as'No ' (a blank is padded on the right) and is not equivalent to ' No' (blank is padded onthe left).

    Creating Variable Profiles.

    First, activate the Variable View window in the new Data Editor, then select the firstempty cell under theNamecolumn. Type in the word Group for the variable name andpress enter. SPSS automatically populates the remaining attributes according to the

    default profile. You may now customize any of the attributes by first selecting the cell inthe row under the heading of the attribute to be changed.

    As you create this profile in Variable View, a correspondingcolumn is created in Data View. No data will appear in thiscolumn, but may be entered later by opening a dataset, directmanual data entry, or via copy/cut and pasting from otherdatasets.

    Note: If you copy and paste data from applications such asExcel, and the data you copy includes a variable header(name), then SPSS will assume that this header is a data value.If the data is numeric and the header is character, then the first

    cell of the pasted column will appear as a missing value whenever that column in DataView corresponds to a variable with a predefined profile in Variable View. If the headerappears to SPSS as numeric, then it will appear as a data value in the first cell.

    Enter 123456789 in the first cell underGroup in Data View. Notice that thecolumn next to Group has a grayed-out

    header called var. This means that thereis no variable profile for this columnand it can be freely used to create a newvariable. Now enter "Hello" in the firstcell of the second column and pressenter. SPSS has provided a default

    name (VAR00001) for the variable in the second column and a profile in Variable View,which is different from the default profile it provided for Group. VAR00001 has a

  • 7/29/2019 GettingStartredwithSPSS 17 PartI 200908

    12/27

    Page12of27

    variable type of string with a width of 5 and the decimals value is grayed out, since thisattribute is not applicable to string variables.

    SPSS automatically determines variable attributes based on the data entered in DataView, if not already defined in Variable View. Here SPSS decided that VAR00001 must

    be a string variable and allocated a width of 5, since Hello contains 5 characters.

    If we wish to enter additional data under VAR0001 that has more than 5 characters, wewill need to increase the width or the data will be lost.

    In Data View, add " out there" to "Hello." What happens?

    In Variable View, select the second cell under width corresponding to VAR0001 andchange the 5 to 15. Now, in Data View, again add " out there" to "Hello." What happens?

    Inserting variables.

    Select row 10 in Variable View and in the

    Edit menu Insert Variable.

    SPSS automatically fills out the additional rows with default variable names and profiles.And in Data View, there will be corresponding columns created for each new variable.You can also copy an existing variable profile and paste it in an empty row to create a

    new variable with that same profile, but with a different name.

    Deleting Variables.

    Variables may be deleted in Data View by

    selecting the appropriate column(s) right click the mouse cut.

  • 7/29/2019 GettingStartredwithSPSS 17 PartI 200908

    13/27

    Page13of27

    Delete the previously created variable namedGroupand notice that it is removed fromboth Data View and Variable View.

    Alternately, you may delete variables within Variable View by

    selecting the row corresponding to the variable to delete right click clear.

    This will also delete the corresponding column of data in Data View. Select row 8 andright click to choose clear. Notice that VAR0008 no longer appears in Data View.

    Deleting Records.

    An individual record (or contiguous rows of records) may be deleted in Data View by

    selecting the row(s) corresponding to the record(s) right click the mouse clear.

    Deleting records does not affect profile entries in Variable View, even if all records aredeleted in Data View. Delete the first record with "Hello out there" in the first column.This record is deleted, but the Variable Profile is left unchanged.

    Editing Variable Profiles.

    Variable profiles may be changed in Variable View by first selecting the table cell of the

    profile attribute to be changed (column) corresponding to a given variable (row). Tochange Type for the first variable, select String Numeric.

    When you selected Numeric, a newVariable Type window appears allowing you tochange the Width and Decimal Places, which may also be changed in Variable View.Change Width to 8 and Decimal Places to 2 OK.

  • 7/29/2019 GettingStartredwithSPSS 17 PartI 200908

    14/27

    Page14of27

    In Variable View, theMeasureattribute is unchanged. ChangeMeasureto scale byclicking on the cell containing nominal and selecting scale from the drop-down menu.

    Next set Columns from to 8 and Align to Right. All eight variables in Variable Viewshould have the same attribute values.

    Some Effects of Changing Variable Profiles.

    This example will serve to illustrate some of the effects of changing variable types afterdata has been entered.

    In Data View, type 123456789 in the first cell under

    VAR0001 right click this cell copy.

    Select the first cell under each of the other 7 variables by sweeping across right click

    paste. The first cell under each variable should have the value 123456789.0. Go backto Variable View and change the Type for each (except VAR0001) as follows:

    VAR0002 Comma OKVAR0003 Dot OKVAR0004 Scientific OKVAR0005 Date OKVAR0006 Dollar OKVAR0007 Custom OKVAR0008 String OK

    Now go to Variable View and change VAR0008 back to numeric. What is the data valuein Data View? Changing between measurement types can causeloss of information in some instances. In this case the number123456789.0 was changed to 120000000.

  • 7/29/2019 GettingStartredwithSPSS 17 PartI 200908

    15/27

    Page15of27

    Change VAR00005 Type from Date to String and then back to Numeric. What is the datavalue in Data View for VAR00005?

    Close the current Data Editor and open a new one.

    Variable Measure.

    Another important variable attribute is measure, which indicates whether the ordering ofthe data values and/or the distance between them is meaningful. Numeric data has anatural ordering and the distance between values is meaningful. For example, if ourvariable isMiles from Downtown, then we know that a house located 1.5 miles fromdowntown is less distance than one located 6.2 miles from downtown, and the distancebetween the two houses is 6.2 - 1.5 =4.7 miles. However, suppose we have a variablenamedJ ob Satisfaction, where the data values are coded as 5 ="Very satisfied", 4 ="Satisfied", 3 ="Neither satisfied nor dissatisfied", 2 ="Dissatisfied", and 1 ="Verydissatisfied." We have a natural ordering of these values, but distance between values is

    no longer a measurable (meaningful) quantity. These coded values were chosenarbitrarily, and we could just as easily have chosen a different set of numbers, such as {1,2, 5, 7, 10}.

    SPSS provides for three measurement levels that can be specified in Variable View:scale, ordinal and nominal.

    Scale. A scale variable has numeric values whose ordering is meaningful andequal distances between measurements correspond to equal differences in theamount of the attribute being measured. In our example above,Miles fromDowntownis a scale variable.

    Ordinal. An ordinal variable is one in which values have a natural ordering, butthe distance between adjacent values is either not measurable or provides noinformation about the actual differences of the attribute being measured. In ourexample above,J ob Satisfaction is an ordinal variable. We can calculate adifference between the coded values, but this difference is not a true measure ofthe distance between the real values. We could just as easily used the actual labelsas the values.

    Nominal. A nominal variable (also known as categorical) is one in which thevalues indicate non-overlapping groups with no information about the ordering ofthe groups or distance between them. Examples of nominal variables are: gender,ethnicity, automobile make, states in the United States, etc.

    Adding Variable Labels.

    SPSS provides two attributes for adding labels to be used when displaying analysisresults:Label andValues.

  • 7/29/2019 GettingStartredwithSPSS 17 PartI 200908

    16/27

    Page16of27

    TheLabel attribute stores the preferred name of the variable to be used instead of thevariable name (VAR00001 etc.) that is stored in theNameattribute. This overcomes thenaming constraints imposed on the variableNameattribute, as outlined above.

    TheValuesattribute allows you to provide labels for the different levels of the datavalues themselves.

    In Variable View, click on the first empty cell under Label. Enter "Gender." All otherattributes have been given default values. Now select the cell next to it under Values andclick to open the Value Labels window.

    Enter 0 in the Value text box Male inthe Label text box click the Addbutton.

    Now enter 1 in Value text box Femalein Label text box click the add button OK.

    Male and Female will now be used aslabels when outputting results rather than0 and 1. Male and Female are the valuelabels, and 0 and 1 the data values for the variable VAR00001 with name label Gender.

    Missing Values.

    Recall that each row is a record (subject), and each designated column is a variable withdata that has been collected corresponding to the subject. Sometimes we may not havedata for all variables for one or more subjects. A missing value is a lack of data for somevariable corresponding to a subject. This is a common problem in many application areas

    and frequently happens in surveys when a respondent only answers some (but not all) ofthe questions.

    SPSS recognizes two different types of missing values:

    System-missing values. SPSS uses the decimal indicator as the missing valueindicator for all cells that are blank (either . or ,).

  • 7/29/2019 GettingStartredwithSPSS 17 PartI 200908

    17/27

    Page17of27

    User-missing values. The user may also specify one or more missing valueindicators, often used to flag reasons for the missing data.

    For example, suppose you are conducting a clinical trial where patients come into aresearch center every month for testing (blood work, blood pressure, etc.) The researcher

    may use -99 to indicate those values that are missing because an instrument recording aparticular variable malfunctioned during the testing, and may use -999 to indicate that thesubject failed to keep a scheduled appointment for a particular testing session.

    If user missing values are defined, then SPSS will show a breakdown of the missingvalues by reason when outputting summary data counts or percentiles. User missingvalues may be defined via theMissingattribute in Variable View.

    Click on a cell under this column and aMissingValueswindow appears with three options for userspecified missing values:

    No missing values - No user-missing values. Allvalues treated as valid. This is the default.

    Discrete missing values - User can specify up tothree discrete (individual) user-missing valuesfor a variable. You can define discrete missingvalues for numeric or short string variables.

    Range plus one discrete missing value- All values between low and high values areflagged as missing, as well as one discrete value outside the range. Not available for shortstring variables.

    Note: A short string variableis a string variable whose width is 8 or less.Close the Untitled Data Editor

    In File menu Closeand select the demo.sav Data Editor window.

    Display Labels instead of Values.

    SPSS allows you to toggle between viewing the data values used internally forcomputation and any labels specified. Sometimes viewing the labels makes dataexploration a little easier. Using the demo.sav Data Editor

    In the View menu Value Labels

  • 7/29/2019 GettingStartredwithSPSS 17 PartI 200908

    18/27

    Page18of27

    Or you can use theValue Labels button in the toolbar at the top.

    Data Values view Value Labels view

    Working with Multiple Data Sources.

    Close SPSS and reopen it.

    File menu Open Data

    Find the demo.sav file and reopen it.

    My Computer C: drive Program Files SPSSInc Statistics17 Samples English demo.sav.

    From the demo.sav Data Editor, open Employee data.sav.

    File menu Open Data Employee data.sav.

    Three windows are now open, two Data Editor windows and one SPSS Viewer windowcalled Output1. To activate a dataset, simply click on its Data Editor window. Only onedataset may be active at a time. Only the variables in the active dataset are available foranalysis. However, data can be copied from one dataset to another and then used foranalysis with that dataset.

    Transferring Variable Profiles between Data Editors.

    Variable profiles may be copied from one dataset to another.

    CopyVariable Profiles in Employee data.sav:

    Activate Employee data.savActivate Variable View Select rows 2 4Rightclick mouse Copy

  • 7/29/2019 GettingStartredwithSPSS 17 PartI 200908

    19/27

    Page19of27

    Pasteprofiles in empty rows in demo.sav:

    Activate demo.savActivate Variable View Select rows 30 32 Right clickmouse Paste

    Notice that SPSS gave VAR00001 as the name of the first variable instead of Gender.This is because demo.sav already has a variable named Gender and SPSS does not allowtwo variables to have the same name.

    Transferring Data Values between Data Editors.

    CopyData Values in Employee data.sav:

    Activate Employee data.sav Activate Data View Select columns 2 4 Rightclick mouse Copy

    Pastedata in appropriate columns in demo.sav:

    Activate demo.sav Activate Variable View Select columns 30 32 (namedVAR0001, bdate and educ) Right click mouse Paste

  • 7/29/2019 GettingStartredwithSPSS 17 PartI 200908

    20/27

    Page20of27

    The data should now appear in the data.sav columns. In this case, there are fewer cases inEmployee data.sav than in demo.sav. Scroll to row 474 in data.sav. This is the extent ofthe Employee data.sav records. All rows beyond this are flagged as having missing values(".").

    SPSS Viewer.

    Results from running a statistical procedure are shown in the SPSS Viewer. This can betables, charts, graphs or text (include script commands). Close Employee data.sav andactivate the Viewer. The text in the windows are the SPSS commands to open the twodatasets that we just opened. and to close Employee data.sav.

    Summary Statistics for Categorical Data.

    Categorical data is data in which each individual is assigned to a category andencompasses both ordinal and nominal data types. Categorical data is also referred to as

    qualitative data. For this type of data, common summary statistics are often reported foreach individual category in additional to overall statistics. SPSS Frequency procedure isdesigned to provide this type of summary for categorical variables.

    In the Analyze menu Descriptive Statistics FrequenciesA Frequencies dialog window will open allowing you to selectthe variables to analyze.

    We are going to choose Owns PDA (ownpda) and Owns TV(owntv) by selecting each and clicking on the add arrow in the

    middle of thedialog box. The arrow changes directiondepending whether a variable is selected inthe right- or left-hand panel. Thus,variables can be returned to the left-handside to deselect them.

  • 7/29/2019 GettingStartredwithSPSS 17 PartI 200908

    21/27

    Page21of27

    Click on the Statistics button in the upper right-hand corner of the Frequencies dialog box. Y oucan now add the statistics that you want, inaddition to the counts, for each variable. Selectthe mean and Std. deviation (standard deviation).

    and click continue. When finished selectingvariables and options, click OK.

    Creating and Editing Charts.

    SPSS provides aChart Builder to enable the user to generate and customize a wideassortment of graphical displays.

    To invoke Chart Builder

    In the Graphs menu Chart Builder

    Frequency tableswill now be addedto the SPSSViewer window,in addition to thecommands used to

    generate them.

  • 7/29/2019 GettingStartredwithSPSS 17 PartI 200908

    22/27

    Page22of27

    The Chart Builder window appears. Itconsists of three zones: Variables list, Chartpreview window and chart buildingtools ina tabbed area at the bottom.

    We will construct a Bar Chart.

    Choose the Gallery tab in the tools zone (atthe bottom), if not already selected. Drag thefirst graph icon in the first row to the Chartpreviewer and drop it.

    FindJ ob Satisfaction in the Variableslist. Right click onJ ob Satisfaction.

    J ob Satisfactionshows as a scale variable, butshould be an ordinal variable as it's values are

    1 ="Highly dissatisfied," 2 ="Dissatisfied," 3="Neutral," 4 ="Satisfied," and 5 ="Highlysatisfied." Y ou can temporarily change avariable's type within Chart Builder withoutaffecting its variable profile in Variable View.The ruler icon to the left of Job satisfaction in

    the Variables list indicates it is a scale variable. Ordinal variables have a bar chart icon totheir left. Nominal have three circles.

    To changeJ ob Satisfaction'stype, selectordinal. A bar chart should now appear to

    the left ofJ ob Satisfaction in theVariables pane. Drag Job Satisfaction tothe Chart Previewer and drop it in theX-Axis? box. Count is automaticallyprovided as the Y-Axis label.

  • 7/29/2019 GettingStartredwithSPSS 17 PartI 200908

    23/27

    Page23of27

    Adding a Title to a graph.

    Click on the Titles/Footnotes tab in thelower zone of Chart Builder. Check

    the Title1 box. This chart element hasbeen added to theElementsPropertieswindow. You may nowenter a chart title in the Content textbox in the Element Properties window.

    Enter "Distribution of Job Satisfaction" and click the Apply button. "T1" appears at thetop of the bar chart as a placeholder for the title you just entered. The titledoes notappear in Chart Builder, but will display when the chart is generated by clicking the OKbutton in the Chart Builder window. After clicking this OK button, the bar chart and

    SPSS commands are added to SPSS Viewer. Y -axis values also appear after the chart isgenerated.

    SPSS Viewer.

    SPSS Viewer has two panes. The right-hand panecollects all SPSS commands and output. The left-hand pane is an outline of all work during thissession. To view previous work, such as theFrequencies output, click on Frequencies. To hideFrequencies, click on the "-" box next to it in the

    left-hand pane.

    Exporting output.

    Output may be exported to the following file formats: Excel (*.xls, HTML (*.htm),Portable Document Format (*.pdf), Power Point (*.ppt), Text (*.txt), or Word/RTF

  • 7/29/2019 GettingStartredwithSPSS 17 PartI 200908

    24/27

    Page24of27

    (*.doc). Additionally, graphs may be exported to PNG file (*.png), Bitmap (*.bmp),Enhanced Metafile (*.emf), Encapsulated Postscript (*.eps), JPEG (*.jpg), or TaggedImage File (*.tif). The default is to export to a Word document.

    Note: Export to PowerPoint is only available with on Windows operating systems and is notavailable with the student version.

    In SPSS Viewer, select the output you wish to export by left clicking on it. In the upperleft-hand corner, you can opt to export everything in the Output window of SPSS Viewer,All visible (open books in the outline pane), or Selected (objects selected in the Outputwindow).

    Left click on the chart in the SPSS Viewer Output window.

    Select the type of output desired in either theDocument or Graphics area by using the pull-down menu underType. (If your output is

    textual only, the graphics selection area will begrayed out.)

    Browse to the directory on your computerwhere you wish to store the output and givethe output a name. When finished, click OK.

    In thecase ofnon-graphical output, the storage designation will be inthe File name text box.

    Click onSelectedin theOutput toExport area.In theType

    menu, selectNone (Graphics only). Now you mayselect a Graphics Type, such as jpeg, png, etc. anddesignate a place to store the graphic along with itsname in the Root File Name.

    You may also copy and paste output to Excel, Word or PowerPoint.

    SPSS Syntax.

    SPSS Syntax files are used to store scripts for later use. Y ou may customize your outputand later wish to use the same sequences of commands on a new dataset.

    Open a new syntax file by

  • 7/29/2019 GettingStartredwithSPSS 17 PartI 200908

    25/27

    Page25of27

    In Data Editor or SPSS Viewer File menu New Syntax

    An SPSS Syntax Editor window opens.

    In the SPSS Viewer, select the commands

    you wish to store in the syntax file, copy andpaste them into the right-hand syntax pane.

    Right click on the commands to open and close the two files: demo.sav and Employeedata.sav Left click Copy, and to generate the Frequency output. Paste into theSyntax file. The left-hand pane shows the commands without the parameterspecifications.

    Save this syntax file as Syntax demo.sps(remember where you saved it). Close all SPSSfiles, including the syntax file.

    Now find Syntax demo.sps and double click onit. This invokes SPSS and opens the syntax file.

    To run the syntax file

    In the run menu All

  • 7/29/2019 GettingStartredwithSPSS 17 PartI 200908

    26/27

    Page26of27

    This should open the two datasets and close Employee data.sav leaving only demo.savopen, and then it will run the Frequency command. However, in SPSS 17 this no longerworks.

    In the Syntax window, left click to the left of the command to open the Employee.savdataset and the two commands to close the two *.savfiles. Res dots should appear to the left of these threecommand lines. The red dots indicate that thesecommands have been deselected.

    To run the commands that are selected, chooseSelectionfrom theRunmenu.

    This will open thedemo.savfile and run the Frequencies analysis.

  • 7/29/2019 GettingStartredwithSPSS 17 PartI 200908

    27/27

    APPENDIX A: SPSS/PASW 17.0 & 18.0 System Requirements

    SPSS/PASW Statistics Base 17.0 version 18

    All

    Super VGA (800x600) or a higher-resolution monitorCD-ROM drive

    512MB RAM; 1GBrecommended

    1GB RAM or morerecommended

    Windows

    Microsoft Windows XP (32-bitversions) or Vista (32-bit or 64-bitversions)Intel or AMD x86 processor running

    at 1GHz or higherFor connecting with PASW StatisticsBase Server, a network adapterrunning the TCP/IP network protocolInternet Explorer 6 or above

    Minimum free drive space:650MB

    Minimum free drivespace: 800MB

    Mac OS X

    Intel processorMinimum free drive space: 800MB

    Java Standard Edition 5.0 (J2SE5.0)

    Apple Mac OS X 10.4(Tiger) or Mac OSX 10.5(Leopard)

    Safari 1.3.1, MozillaFirefox 1.5 or higher, orNetscape 7.2 or higher

    Apple Mac 10.5x(Leopard) and 10.6x(Snow Leopard). (32-bitand 64-bit)

    Safari

    Linux

    Intel or AMD x86 processor runningat 1 GHz or higherMinimum free drive space: 800MB

    Kernel 2.6.9.42 or higherglibc 2.3.4 or higherXFree86-4.0 or higherlibstdc++5Konqueror 3.4.1 or higher,or Firefox 1.0.6 or higher,or Netscape 7.2 or higher

    32 bit OnlyKernel 2.6.26.25Glibc 2.8XFree86-4.7Libstdc++6Mozilla Firefox