The Graphical User Interface
****************************

This chapter provides a description of the PSPP graphical user interface.

Primary Windows
===============

The PSPP graphical user interface provides a set of windows through which you store, edit and analyze data. You can choose to perform tasks and operations through interactive drop down menus in the data editor window or through command line statements entered in the syntax editor.The three primary windows include the Data Editor, Syntax Editor, and the Output Viewer.

Data Editor

     The data editor window is central to PSPP and launches when you start a session. This window is similar in organization to a spreadsheet, where data is stored and edited in columns and rows of cells.

     -INSERT FIGURE

Syntax Editor

     The syntax editor window is where you can enter command line instructions to edit, import and analyze data. This has the advantage of enabling batch processing and code reuse. Launch the syntax editor from the data editor window by selecting File->Open->Syntax.

Output Viewer

     A window that displays any instructions executed as well as the results of any statistical analyses including, text, tables, and charts. Note: this window is not visible upon start up and only pops open after an instruction set has been executed.

Data Editor Window
==================

There are two alternate views: emphdata view and emphvariable view. Data view shows the numerical value held by each datum while the other displays the metadictionary data of each variable. Toggle between views by clicking on the emphData View or emphVariable View tab at the bottom left hand corner of the window.

-INSERT IMAGE

Data View
---------

A specified layout is used where rows represent cases and columns measured variables, e.g., in the hotel customer satisfaction survey (see figure x.) each row represents the set of answers given by each respondent and each column represents one question.

-INSERT FIGURE

Variable View
-------------

Display the variable attributes associated with each case, where the variable attributes (see section x) include name, type, width, decimal, variable label, value label, missing values, columns, align, and measurement.

-INSERT FIGURE

Data Entry and Editing
----------------------

New Variable
............

Enter a new variable by selecting emphinsert variable from the emphedit drop down menu or tool bar. This function inserts a new variable with a generic name. In addition, if you already have at least one variable defined, then you can add a new variable to the left of the current column by right clicking on the variables title and selecting insert variable from the pop-up menu.

-INSERT  FIGURE

Edit Variable Attributes
........................

You can edit variable attributes such as Name, Type, Width, Decimals, Label, and Values, Missing, Columns, Align, and Measure move in variable view.

Name

       * Click a cell in the emphName column.

       * Type a new name in the cell.

       * Press the enter key.

     -INSERT IMAGE

Type

       * Click a cell in the emphType column.

       * Click on the grey box that appears to bring up a Variable Type dialogue box.

       * Choose a variable type (see needNode) from the list: Numeric, Comma, Dot, Scientific Notation, Date, Dollar, Custom Currency, and String.

       * Enter the width and/or number of decimal places, if relevant.

       * Press OK.

     -INSERT IMAGE

Width

       * Click a cell in the emphWidth(see needNode) column.

       * Select the up-down arrow that appears in the cell to alter the value.

     -INSERT FIGURE

Decimals

       * Click a cell in the emphDecimals(see needNode) column.

       * Select the up-down arrow that appears inside the cell to alter the value.

     -INSERT FIGURE

Label

       * Click a cell in the emphLabel column.

       * Type a variable label in the cell.

       * Press enter.

     -INSERT FIGURE

Values

       * Click a cell in the emphValues(see nodeNeed) column.

       * Click the gray box that appears inside the cell to bring up the emphValue Labels dialogue box.

       * Enter the Value label.

       * Click the Add Button.

       * Repeat to add other labels, if necessary.

       * Press OK.

     -INSERT FIGURE

Missing

       * Select a cell in the emphMissing column.

       * Click the gray box that appears inside the cell to bring up the emphMissing Values dialogue box.

       * Enter either up to three discrete missing values or specify a numerical range plus one discrete value. See needNode for further information.

       * Press OK.

     -INSERT FIGURE

Columns

       * Select a cell in the emphColumns (see also nodeNeed) column.

       * Click the up-down arrows that appears inside the cell to alter the value.

     -INSERT FIGURE

Align

     Align values left, right or center in a cell

       * Click a cell in the emphAlign column.

       * Select left, right, or center from the drop down menu that appears.

     -INSERT FIGURE

Measure

       * Select a cell in the column emphMeasure (see needNode).

       * Select either nominal, ordinal, or scale from the drop down menu.

     -INSERT FIGURE

New Case
........

There are a few ways to add a new case to an existing variable:

  * Select Edit->Insert Case from the drop down menu.

  * Select emphInsert Cases from the toolbar.

  * Right click on the row number above the insertion point to bring up a pop menu, and select emphInsert Cases.

-INSERT FIGURE

Read Variable in Data View
..........................

Hover the mouse over the variables name at the top of the column to view its label.

-INSERT FIGURE

Change Data Value
.................

  * Switch to data view, if you are not there already.

  * Select the cell you want to change.

  * Type the new value.

  * Press enter.

Select Entire Row or Column
...........................

Right click on the column title or row number to select the entire column or row, respectively.

Clear Variables
...............

There are a couple of ways to clear columns.

  * In data view:

            * Right click on the variable name at the top of the column.

            * Select emphClear Variables from the pop-up menu.

            * Right click on the column to select it.

            * Select Edit->Clear Variables from the drop down menu.

  * In variable view:

       * Right click on the number title to the left of the row.

       * Select emphClear Variables from the pop-up menu.

-INSERT FIGURE

Clear Cases
...........

There are a couple of ways to clear cases.

       * Right click on the row number to the left of  the row.

       * Select emphClear Cases from the pop-up menu.

       * Right click on the row number to the left of  the row.

       * Select Edit->Clear Cases from the drop down menu.

-INSERT IMAGE

Sort Cases
..........

There are two alternative ways to sort cases.

  * Right click on the variable title and select emphAscending or emphDescending from the pop-up menu.

  * Right click on the variable title and select Data->Sort Cases (see needNode).

-INSERT FIGURE

Status Bar
----------

Located at the bottom of the data editor window, provides information about the data under process.

-INSERT FIGURE

Filter Status

     Turns on when you filter a subset of cases in the current file for analysis.

Wieght Status

     States the variable you are weighting the data against in the analysis.

Split File Status

     Indicates there are separate data into groups.

Main Menu Overview
..................

Perform tasks and operations on data with functions available through the drop down menus and toolbar. See also nodeNeed.

File

     Perform all file handling operations such opening, closing and saving files.

Edit

     Move data and text around with cut, copy, and paste operations. In addition, can use to insert data and cases and perform searches.

View

     Use to change fonts, display extra information such as a status bar and value labels, and toggle between emphdata and emphvariable view.

Data

     Perform operations on data sets, such as sort, transpose, apply weights, extract subsets of cases, and split files.

Transform

     Replace select data with the result of applying mathematical or other operations on it.

Analyze

     Perform statistical analyses on the data.

Utilities

     Use to insert comments and view summary information of each variable.

Windows

     Use to toggle between open windows, split and minimize them.

Help

     Provide help contents.

Output Viewer
=============

The output viewer displays results, charts, and the instruction set executed, whether invoked from a menu command or the syntax window.

Note: The output viewer is not visible when PSPP loads, and appears upon execution of the first set of instructions.

Examples

 1. Output viewer displays the last set of instructions executed.

          -INSERT FIGURE

 2. -INSERT FIGURE

     The right pane of the output viewer displays results such as tables, text, and charts. The left pane gives a corresponding outline.

     -INSERT FIGURE

Save Output Viewer Contents
---------------------------

To save the results in the output viewer select File->Export. File types include PDF, HTML, Open Document, Text, and Postscript.

Syntax Editor
=============

Use the Syntax Editor window to enter command line instructions. For syntax and rules (see needNode).

Enter commands into the syntax window and then execute them by selecting run from the menu. The instruction set can optionally be saved for later reuse. For example, the following set of commands populates the data editor with a list of random numbers.

-INSERT FIGURE

Enter Commands
--------------

Most data-editor-menu functions enable you to paste the command line equivalent to that function directly into a syntax window from within the functions dialogue box, by selecting the paste button.

     Place a command line instruction that generates descriptive statistics in the syntax editor window.

       * Open file xxx.sav.

       * Select Analyze -> Descriptive Statistics -> Descriptives (refer to section x)

          -INSERT FIGURE

       * Select emph{variables and statistics} in the emph{Descriptives} dialogue box

          -INSERT FIGURE

       * Click the Paste button to insert the command line equivalent of the function into the syntax editor.

          -INSERT IMAGE

Run
---

Select run to execute code in the syntax window.

Options include:

Execute all commands.   Run->All
Execute highlighted commands.   Run->Selection
Execute a single line at current cursor position.   Run->Current Line
Execute at cursor position onwards.   Run->To End

Save
----

Save a set of commands by selecting emphSave in the emphFile drop down menu.

Main Menu
=========

File
----

New
...

Open a new data or syntax file.

Open
....

Open data, syntax, system, or portable files.

Import Delimited Text Data
..........................

Import all or part of a delimited text data file into the data editor. A series of dialogue boxes guides you through this process as follows:

     Importing Textual Data Dialogue Box

     Import all or part of the file.

     -INSERT FIGURE

     First Line of Data Dialogue

     Select the first line of data.

     -INSERT FIGURE

     Choose Separators Dialogue

     Choose a delimiter. Options include:

       * Space

       * Colon (:)

       * Pipe (|)

       * Tab

       * Comma (,)

       * Semicolon (;)

       * Bang (!)

       * Hyphen (-)

       * Slash (/)

       * Custome Separator

     You can also choose how to quote separator characters.

     -INSERT FIGURE

     Adjust Variable Formats

     Verify and edit variable attributes (see needNode).

     -INSERT FIGURE

     Select the emphApply button to import the data.

Save
....

Save the current file.

Save As
.......

Save the current file with a name and location of your choosing.

Display Data File Information
.............................

  * Working File

     Display the dictionary of the currently opened file.

     -INSERT FIGURE

  * External File

     Display the dictionary of a data file that is not yet open.

Recently Used Data
..................

Links to recently used data files.

Recently Used Files
...................

Links to recently used syntax files.

Quit
....

Close the current data file and shutdown PSPP.

Edit
----

Insert Variable
...............

Insert a new variable in data view to the left of the current column. The editor fills in system-missing values for all cases as a placeholder. By default, PSPP inserts a numerical variable type. See also needNode.

     Select Edit->Insert Variable to enter a new variable.

     -INSERT FIGURE

Insert Cases
............

Insert a new case in the selected row if it is empty, or, above otherwise.

Go To Case
..........

Jump to the selected case number.

Cut
...

Remove the selected text and place it elsewhere by selecting paste at the desired insertion point.

Copy
....

Copies text onto the clipboard. Highlight the text and then select Edit->Copy.

Paste
.....

Places the contents stored on the clipboard at the insertion point.

Find
....

Look for a case.

View
----

Status Bar
..........

Turn the status bar on or off.  See needNode for further information.

Font
....

View and edit the current font settings.

Grid Lines
..........

Make the grid lines in the data editor window visible or invisible.

Value Labels
............

Show the value label associated with each result in data view.

     The data editor window on the right of figure x displays the value labels of the numerical survey data displayed in the window to the left.

     -INSERT FIGURE

Variables
.........

Switch the data editor between data and variable view.

Data
----

section Sort Cases

Sort cases in ascending or descending order based on one or more variables.

Transpose
.........

Exchange rows and columns on data that is in the reverse order to the PSPP file format. Standard file format lists cases in rows and variables in columns.

Split File
..........

Split data into groups using grouping variables. If you select more than one grouping variable then you need to nest each successive category within the previous one.

Note: Cases should be sorted with the emphSort Cases command first such that they are in the same order as the grouping variables listed under the emphGroups based ontextbox.

-INSERT FIGURE

     Group a file with physiology data according to height.

     -INSERT IMAGE

       * Open the file xxx.sav.

       * Select Data->Split File.

       * Select the emph{Compare groups}radio button in the pop up window.

       * Click emph{Height in millimeters} to highlight the variable.

     -INSERT IMAGE

       * Select the arrow to the left of the emph{Groups based on} textbox to move the emph{height} variable inside that textbox.

       * Click OK to see the results in the output viewer.

     -INSERT IMAGE

Compare Groups

Show split-file group output along side each other. For example, the output viewer displays a chart for each group in a single window.

Organize Output by Groups

Show results for each split-file group separately.

     Using a data file containing physiology data, the file is grouped based on emph{height} using the Split File menu command.

     -INSERT FIGURE

       * Select Data->Split File.

       * Select the Compare Groups radio button in the dialogue box.

       * Click emph{height} in millimeters to highlight the variable.

          -INSERT FIGURE

       * Press the right arrow.

       * Hit OK.

Select Cases
............

Seems non-operational.

Weight Cases
............

Assign weights to variables. Note: Cases with a zero, negative, or missing value for the weighting variable are not included in the analysis.

Transform
---------

Compute
.......

Perform operations on numeric and string variables. Compute new variables or replace existing ones.

     Compute the absolute difference in weight before and after participants follow a new diet plan (see figure x).

     -INSERT FIGURE

       * Open the file xxx.sav.

       * Select Transform->Compute from the drop-down menu to bring up a Compute Variable dialogue box.

          -INSERT FIGURE

       * Enter weight_change quotation in the Target Variable textbox and click the Type & Label button below it; This variable holds the result of the calculation.

          -INSERT FIGURE

       * Select the emph{Label} radio button in the emph{Type and Label} dialogue box, and enter weight change in kilograms quotation.

       * Press Continue.

       * Select the ABS(number) function from the list of functions and press the up arrow to place the function up in the Numeric Expressions textbox.

       * Select emph{weight_after}from the list of variables located on the left of the dialog box.

          Note: when you hover the mouse over the list of variables this brings up their names.

          -INSERT FIGURE

       * Click in between the parenthesis of the function in the emph{Numeric Expressions} textbox to move the cursor position.

       * Click the right arrow to the left of the Numerical Expressions textbox to move ABS(weight_after) variable to the cursor position in the box.

       * Delete the question mark if it is still present in the ABS arguments.

       * Enter a space followed by a minus sign after  emph{weight_after}, as follows: ABS(weight_after - )

       * Select the emph{weight_before} variable from the list on the left side of the Compute Variable dialog box.

       * Place the cursor after the minus sign of the mathematical expression in the emph{Numeric Expressions} textbox .

       * Click the right arrow.

          -INSERT FIGURE

       * Click OK to add the result to the data file.

     -INSERT FIGURE

Rank Cases
..........

Create new variables that hold ranks, Savage scores, Normal scores, and percentile values for numeric variables in the current data file. PSPP automatically names and labels these such as to indicate original variable name and selected measures.

-INSERT FIGURE

Select the emphSmallest Value option from the emphAssign rank 1 to box for ascending order and emphLargest Value for descending.

Rank numerical variables by moving them into the Variables textbox (highlight the variable then click the right arrow).

Organize rankings into subgroups by moving the variables upon which the others will depend into the emphBy textbox, e.g., move emphgender and emphheight to calculate ranks for each combination of gender and height.

Rank Types

Bring up the emphRank Cases Types dialogue box by clicking on the emphRank Types Button towards the bottom of the emphRank Cases dialogue. This dialogue box includes the following options: Rank, Savage score, Fractional rank, Fractional rank as a percent, Sum of case weights, Ntiles , Proportion Estimates, and Normal Scores.

-INSERT FIGURE

Rank

     The value of the new variable is its rank.

Savage Score

     Savage scores calculated using an exponential distribution

Fractional Rank

     Return rank divided by the sum of the weights.

Fractional Rank as a Percent

     Return rank divided by the number of cases as a percent.

Sum of Case Weights

     Return sum of the case weights.

Ntiles

     Return a rank according to the percentile group.

     The size of each percentile group is given by 100/Ntile. For example, if Ntile=4, then rank 1 corresponds to the 1st 25th percentile, rank 2 corresponds to cases between the 25th and 50th percentile, rank 3 to cases between the 50th and 75th percentile and rank 4 to the last percentile group.

strongProportion Estimates

     Estimate of the cumulative proportion of the distribution corresponding to a specific rank.

Normal Scores

     Return z scores corresponding to the estimated cumulative proportion. Choose from a range of proportion estimate formulae when calculating proportion estimates and normal scores; options include Blom, Tukey, Rankit, or Van der Waerden.

     Blom

          Ranking variable based on proportion estimates which employ the formula (r - 3/8)/(w+ ), where mathw is the sum of the case weights and r is the rank.

     Tukey

          Apply the formula (r - 1/3)/(w + 1/3), where r is the rank and w is the sum of the case weights.

     Rankit

          Estimate expected values using (r - 1/2)/w, where w is the number of observations and r is the rank which ranges from unity to w.

     Van der Waerden

          Returns Van der Waerdens transformation, given by the formula r/(w+1), where w is the sum of the case weights and r is the rank, ranging from 1 to w.

Ties

     Use to select the method for assigning rankings to cases with the same value on the original variable.

     -INSERT FIGURE

Recode into Same Variables

Recode different values of the same type (numeric or string) into a variable. There are two options available: 1) change a single value to a new one or 2) change a range of values to a category.

 1. Example: Change a single value.

          Increase the value 12 Miles per Gallon (MPG) to 13 in a data set listing the mileage per gallon of a specific brand of car.

          -INSERT FIGURE

            * Open file xxx.sav

               Select Transform->code{Recode into Same Variables} to bring up a Recode dialogue box.

               -INSERT FIGURE

            * Select emph{Miles Per Gallon} and click the right arrow to move the variable into the Variables textbox.

            * Click the emph{Old and New Values} button to bring up its dialogue box.

               -INSERT FIGURE

            * Type the number 12 in the Value text box under emph{Old Value} on the left side.

            * Type the number 13 in the Value text box under emph{New Value} on the right side.

               -INSERT FIGURE

            * Click the Add button. The number 12 now appears under old and 13 under new.

               -INSERT FIGURE

            * Press Continue to close the emph{New Values} dialogue box

            * Click OK on the emph{Recode into Same Variable} dialogue box.

          The value 12 MPG is now 13 MPG.

 2. Example: Collapse a Range of Values into a Category

            * Convert the mileage per gallon values in the xxx.sav automobile data set for a specific brand of car into three categories, as follows:

                1. If emph{Miles Per Gallon} is less than 19 MPG then give it a value of one.

                2. If emph{Miles Per Gallon} is greater than or equal to 19 MPG and less than 24 then give it a value of 2.

                3. If emph{Miles Per Gallon} is greater or equal to 24 then give it a value of three.

            * Select Transform->Recode into Same Variables.

            * Select the emph{range LOWEST thru value} radio button, and enter 18.

            * Enter the number 1 in the value field under emph{New Value} on the right side of the dialogue box.

            * Click the Add button, to get the LOWEST-18 listed under old and 1 under new.

            * Repeat with the other value ranges:

                 * Select the range-through radio button and then enter 19 in the first text box and 23 in the second.

                 * Enter the number 2 in the value text box under New Value, and click the Add button.

                 * Select the emph{range thru HIGHEST} radio button and enter 24.

                 * Enter the number 3 in the value field under emph{New Value}, and click the Add button.

               -INSERT FIGURE(title will describe )

            * Click Continue. The Old and New Values dialogue box disappears.

            * Click OK on the Recode into New Variables dialogue box to put the new values in the MPG variable column.

          -INSERT FIGURE

Recode into Different Variables
...............................

Change variable values and save into a new one. There are two options available; change a single value to a new one or change a range of values to a category. Note, that  the new variable type must be the same as the original; numeric or string. (see also Recode into Same Variables.

-INSERT FIGURE

Analyze
-------

Descriptive Statistics Definitions
..................................

Central Tendency

     Measure of the central position of a set of data.

Mean

     Average value, or first moment (see definition below), defined as sum of all data within a set divided by the number of cases in the set. Note: the mean is susceptible to outlying values, e.g., the average temperature over a month in a region that has had a few unusually hot days will be higher than usual.

     Note: Moments are the sums of integer powers of the values, where a higher integer power corresponds to a higher moment e.g. the variance is the second moment, skewness the third, and kurtosis the fourth.

Median

     The central value of an ordered set of numbers. In other words, 50% of the values fall above or below it. When the number of data values is even the median is the average of the middle two. The median is not as susceptible to outlying values as the mean.

Mode

     Most frequently occurring value. Note that there can be more than one mode in a data set.

Sum

     The addition of all values across the different cases excluding missing ones.

Dispersion

     A measure of the spread or variation in data values about the mean.

Standard Deviation

     A measure of the spread in values about the mean equal to the square root of the sum of the squares of the difference between each value and the mean, for all values, divided by one less than the number of cases.

Variance

     The standard deviation squared, or the second moment.

Range

     The difference between the largest and smallest numerical values in the set.

Minimum

     The smallest numerical value in the set.

Maximum

     The largest numerical value in the set.

S.E. Mean

     The standard error of the mean is a measure of by how much the value of the mean varies with different samples from the same distribution.

Distribution

     Statistics that describe the shape and symmetry of a distribution.

Skewness

     A measure of the asymmetry of a distribution. You can calculate this by taking the third moment (proportional to the sum of the cube of the difference of each data value and the mean). Unlike the mean and variance the definition is such as to make it a dimensionless quantity, and this pure number characterizes the shape of the distribution. Positive values indicate the distribution has a more heavily pronounced right tail, while negative values indicate a more prominent left one. When both tails are equal the skewness is zero.

Kurtosis

     A measure of the relative peakedness or flatness compared to a normal distribution. You can calculate this by taking the fourth moment (proportional to the sum of the fourth power of the difference of each data value and the mean). Like the skewness, this is also a dimensionless quantity. A distribution with negative kurtosis is termed leptokurtic, while a distribution with a positive value as platykurtic, and an in-between one is termed mesorkurtic.

Frequencies
...........

The frequencies dialogue box enables you to generate statistics including central tendency (mean, median, mode, and sum), dispersion (standard deviation, variances, range, minimum, maximum, standard error of the mean) and distribution (skewness and kurtosis). Optionally, you can also view frequency tables and charts.

-INSERT FIGURE

The frequencies dialogue box lists all variables along the left side. In order to perform statistical analyses or plot charts move the variables into the emphVariables dialogue box. To do this, first, click on the variable until it is highlighted and then select the right arrow.

-INSERT FIGURE

-INSERT FIGURE

You can turn the option to display frequency tables on or off, as well as choose in what way to order the tables; ascending or descending value or ascending or descending frequency. -INSERT FIGURE Plot histograms or pie charts with the Chart Dialogue box. Histogram options include scaling with either frequencies or percentages and superimposing a normal curve. Pie charts come with the option to include slices for missing values.

     Analyze the extent to which hotel customers were satisfied with the level of service in the following survey.

     -INSERT FIGURE

       * Select Analyze-> Descriptive Statistics-> Frequencies to bring up the Frequencies dialogue box.

       * Select the first variable from the list on the left side then click the right arrow to move it inside the Variables dialogue box.

          -INSERT FIGURE

       * Select the charts button to bring up the Charts dialogue box.

       * Select Draw Histograms and press Continue to close this dialogue box.

          -INSERT FIGURE

       * Select mode from the statistics options in the Frequencies dialogue box.

          -INSERT FIGURE

       * Press OK to display the results in the output viewer.

     -INSERT FIGURE

Descriptives
............

Display univariate summary statistics and z scores. Statistics include central tendency (mean), dispersion (standard deviation, variance, range, minimum, maximum, and standard error of the mean), and distribution (kurtosis and skewness).

A z score is a dimensionless variable that classifies how many standard deviations a value is from the mean. Also known as standardizing or normalizing. Based on normal theory, these are best for quantitative variables with symmetrical distributions. Note, if the distribution is skewed the z scores will be as well.

     Begin by making a data set in the syntax editor.
     Write a small program to generate normally distributed numbers that represent SAT test scores with a mean of 500 and standard deviation of 110 as follows:

       * Select File->New->Syntax to open a syntax window.

       * Enter the following command lines shown in figure x.  into the syntax window.

          -INSERT FIGURE

       * Select Run->All to execute the program and populate the data editor with random numbers drawn from a normal distribution.

          -INSERT FIGURE

     Next, calculate the z scores using the Descriptives menu command.

       * Select Analyze->Descriptive Statistics->Descriptives to bring up the Descriptives dialogue box.

       * Select the emph{newvar} variable by clicking on it in the variables list to the left of the dialogue box, and then by clicking the right arrow to move it over into the Variables textbox.

       * Select the emph{save Z scores of selected variables as new variables} check box.

       * Click OK to generate a list of z scores under the new variable in the data editor window.

     -INSERT FIGURE

Explore
.......

Provides descriptive statistics including percentiles and extremes, and in addition, enables you to examine subgroups of data. Descriptive statistics include the mean, median, variance, standard deviation, minimum, maximum, range, skewness, and kurtosis.

     Generate descriptive statistics of the following data set of SAT test scores versus gender for everyone, independent of gender, or break it down into subgroups and do a separate analysis for each gender type.

     -INSERT FIGURE

     Start by looking at all test scores independent of gender.

       * Select Analyze-> Descriptive Statistics-> Explore to open the Explore dialogue box.

          -INSERT FIGURE

       * Select Score and press the right arrow button next to the emph{Dependent List} box.

       * Click the Statistics button at the bottom left side of the dialogue box to bring up the statistics pop-up box.

       * Select the emph{Descriptives} and emph{Extremes} check boxes, and then press continue.

          -INSERT FIGURE

       * Press OK on the Explore dialogue box to display the results in the output editor.

          -INSERT FIGURE

     Repeat the analysis, examining each gender group separately, where 0 represents male.

       * Select Analyze->Descriptive Statistics->Explore to open the Explore dialogue box.

       * Select emph{Score} and press the right arrow button beside the emph{Dependent List} textbox.

       * Select emph{Gender} and press the right arrow button beside the emph{Factor List} textbox.

          -INSERT FIGURE

       * Press the Statistics button at the bottom of the Explore dialogue box.

       * Select the emph{Descriptives} and emph{Extremes} check boxes and then press the continue button.

       * Press OK on the Explore dialogue box to display the results.

     The output viewer lists different statistics for each group. For example, the lowest and highest test scores are 182.98 and 835.52, respectively, for the males, and, 179.03 and 805.10 for the female group.

     -INSERT FIGURE

Crosstabs
.........

Examine bivariate relationships through cross tabulation. This tool is useful for determining if one variable is dependent upon another, e.g.,  in a customer satisfaction survey you might discover a dependency of customer satisfaction levels on price.

Statistics and Measures of Association

Chi-Square

     Use Pearsons Chi-Square to test if the frequency in each cell is at least five; when the frequency is less than five and the contingency table is 2 x 2 in size then Fishers exact test is performed. When both variables are quantitative this function also returns a linear-by-linear association test.

Correlations

     Return Spearmans correlation coefficient and rho for numeric data when the values in the rows and columns are ordered. When both variables are quantitative returns the Pearsons R.

Nominal Data

     Measure the degree of association with several coefficients.

     Phi

          Measure of association that returns the square root of the chi-square coefficient divided by the sample size. Typically, apply this to 2 x 2 tables although it can handle larger sizes. For 2 x 2 tables phi is identical to the correlation coefficient, but for larger ones the interpretation can be more complex.

     Contingency Coefficient

          An adjustment to phi in order to make it suitable for tables larger than 2 x 2. The coefficient is equal to the square root of chi-square divided by chi-square plus the sample size. Note: For tables smaller than 5-by-5 this underestimates the level of association.

     Cramer's V

          This measure of association gives accurate results when the number of rows and columns are equal, independent of size. V is equal to the square root of chi-square divided by the product of the sample size and the length of the smallest row or column.

     Lamda

          Returns the percent by which you reduce the error when estimating the value of the dependent variable based upon on the value of the independent one. A lambda of zero means that there is no advantage in using the distribution of the independent variable to estimate the value of the dependent variable.

     Uncertainty Coefficient

          Otherwise known as the entropy coefficient, is the percent reduction in error accounting for the variance in the dependent variable, where variance is defined in terms of entropy. When the uncertainty coefficient is zero, the independent variable is not helpful in predicting the dependent variable.

Ordinal Data

     Gamma

          Returns the strength of association for ordinal data, ignoring tied (cases have equal values on both variables) pairs. Gamma is defined as the number of concordant pairs minus the number discordant ones over the sum of each type of pair. Cases form a concordant pair when the ranking agrees; meaning one case has a higher value than another case on both variables. When one case has a higher value on one variable, but a lower value on another the ranking disagrees and the cases form a discordant pair. Values of gamma range from -1 to 1. A value of 1 indicates perfect agreement between the rankings, while a value of -1 means there is perfect disagreement. When gamma is equal to zero then there is no association between cases. Note: Since gamma ignores ties, the strength of association between two variables might be over-exaggerated.

     Somers'd

          Modification to Gamma that accounts for pairs tied on the dependent variable; values range from -1 for negative relationships to +1 for positive ones.

     Kendall's Tau B

          A modification to gamma that takes into account tied pairs tied on both the dependent and independent variable. Kendalls Tau-B is symmetrical in that the same value is produced regardless of which variable is considered independent. Tau-b can only reach its maximum or minimum values of 1 and -1 for square tables.

     Kendall's Tau C

          A modification to gamma that takes into account tied pairs tied on both the dependent and independent variable. This is a variant of Tau-B that can reach the maximum and minimum values of +1 and -1 for non-square tables.

Nominal by Interval

     Eta

          Use this gauge of association when the dependent variable is a quantitative measure and the independent variable is categorical. Eta ranges from 0 to 1, with increasing values indicating a higher degree of association.

     Cohen's Kappa

          Kappa is a measure of the degree to which two raters agree over their sorting of items into mutually exclusive categories, and takes into account agreement that occurs by chance. Values range from -1 to +1 and represent the proportion of agreements between raters after adjusting for those that take place by chance. A value of +1 indicates perfect agreement and -1 perfect disagreement. When kappa is zero, then there is no relationship between the raters and any agreements or disagreements are due to chance only.

     Estimated Relative Risk

          The observed risk of having the outcome of interest be greater due to a specific factor.  Use the odds ratio as an estimate or measure of risk if the occurrence of the factor is rare. A confidence interval greater than one indicates there is a greater chance of the event occurring in the presence of the factor. Note: this is only suitable for 2 x 2 tables.

               Consider a medical study examining the relative risk of patients having cerebella toxicity who have taken a generic chemotherapeutic agent rather than a non-generic one.

                 Toxicity+   Toxicity-
               Generic+   11   14
               Generic-   3    31

                 * Enter the data from table x into a PSPP data sheet as follows in figure x. below , where +1 represents positive (+) and 0 negative (-):

                    -INSERT IMAGE

                 * Weight cases by selecting Data->Weight Cases, and then choose the emph{Weight Cases By:} option (see figure x).

                    -INSERT IMAGE

                 * Select Analyze-> Descriptive Statistics -> Crosstabs to open the Crosstabs dialogue box.

                 * Move the variable emph{toxicity} from the list on the left side of the dialogue box into Rows and emph{Generic} into Columns.

                 * Click Statistics to bring up the Statistics dialogue box.

                    -INSERT IMAGE

                 * Select the Risk check box and then click Continue to close this dialogue box.

                 * Click OK on the Crosstabs dialogue box to display the results in the output viewer.

                    -INSERT IMAGE

Compare Means
.............

One-Sample T-Test

Tests if the mean of a single variable differs from a specified constant.

     Compare the mean of the measured lifetime of 100 soft white light bulbs to that claimed by the manufacturer (700 hours).

       * Open the file LightBulbHours.sav.

       * Select Analyze-> Compare Means -> One Sample T Test.

       * Select the hour variable from the list on the left side of the dialogue box and then click the right arrow to move it into the emph{Test Variables} textbox.

       * Enter the value 700 into the emph{Test Value} textbox.

          -INSERT IMAGE

       * Click OK to view the results in the output window.

          -INSERT IMAGE

Independent Samples T Test

Compare means of the same variable taken from two independent samples. Although the test requires normally distributed data, minor departures from this assumption are tolerable, and there is no requirement that the samples are the same size.

     Compare mean heights, in centimeters, of ten twelve-year-old boys to ten twelve-year-old girls.

       * Enter the following emph{height} and emph{gender} data into PSPP, where 0 represents female and 1 male.

          152.71    0
          142.57    0
          155.48    0
          148.79    0
          167.74    0
          149.51    0
          142.00    0
          150.21    0
          171.19    0
          141.99    0
          152.67    1
          139.65    1
          152.19    1
          156.94    1
          151.86    1
          157.79    1
          152.49    1
          157.52    1
          156.95    1
          141.61    1

       * Name the first variable emph{Height} and the second emph{Gender}.

       * Select Analyze-> Compare Means -> Independent Samples T Test.

       * Select emph{Height} from the list on the left side of the dialogue box and then click the upper right arrow to move it into the emph{Test Variables} box.

          -INSERT IMAGE

       * Select emph{Gender} and click the lower right arrow to move the variable into the emph{Define Groups} area.

       * Click the emph{Define Groups} button at the bottom of the dialogue box.

          -INSERT IMAGE

       * Enter 0 into the Group1 Value textbox of the emph{Define Groups} dialogue box.

       * Enter 1 into the Group2 Value textbox of the emph{Define Groups} dialogue box.

       * Select Continue.

          -INSERT IMAGE

       * Click OK on the emph{Independent-Samples T Test} dialogue box to examine the results in the output viewer.

          -INSERT IMAGE

Paired Samples T Test

Compare means of two sets of quantitative data, where data sets are organized into pairs with a definite relationship, e.g., one set of data might represent a measurement taken before some event and the other a measurement after. Each pair is then the measurement before coupled with the measurement after.

     Compare the means of the following measurements (figure x) from nine asthmatics of their peak expiratory flow rate before and after a walk on a cold winters day.

     -INSERT IMAGE

       * Enter the data from table x into a PSPP data sheet as follows in figure x. below, where +1 represents positive (+) and 0 negative (-):

          -INSERT IMAGE

       * Select Analyze->Compare Means-> Paired Samples T Test.

       * Highlight the emph{Before} variable with the mouse and then click the right arrow to place it in the Test Variables dialogue box under emph{Var1}.

          -INSERT IMAGE

       * Repeat the same steps with the emph{After} variable to place it under Var2.

       * Click OK to display the results in the Output window.

          -INSERT IMAGE

One Way Anova

Indicates if there are significant differences between means of three or more independent groups, where the independent variable consists of two or more categorical independent groups and the dependent one is either interval or ratio. Note: this only tells you if the means of the groups are significantly different and not which ones.

-INSERT IMAGE

Optional Statistics include:

  * Descriptives (mean, standard deviation, standard error of the mean, minimum, maximum, and 95% confidence intervals for each dependent variable)

  * Homogeneity of variance test that calculates the Levene statistic to look for the equality of variances

Specify contrasts the you want tested by the t statistic with the emphContrasts button in the dialogue box.

     Determine if the mean of each smoker group's lung capacity varies, where the different groups include non-smoker, light-smoker, medium-smoker, and heavy-smoker.

       * Open the data file XXX.sav. This lists forced expiratory flow measurements under the variable emph{FEF} and the corresponding group type (non-smoker=0, light-smoker=1, medium-smoker=2, heavy-smoker=3) under emph{Groups}.

          -INSERT IMAGE

       * Select Analyze-> Compare Means-> One Way ANOVA

       * Click on emph{FEF} from the list of variables on the left side of the dialogue box then select the upper right arrow to move it into the emph{Dependent Variables} textbox.

       * Select the emph{Group} variable and click the lower right arrow button to place it inside the emph{Factor} textbox.

          -INSERT IMAGE

       * Click OK to displays the results in the output viewer.

     -INSERT IMAGE

Contrast - make sure font similar to section fonts

Contrast is a weighted sum of the means that enables you to test your research hypothesis as opposed to the statistical one.

     Check if the mean lung capacity of non-smokers varies from that of smokers, independent of how many they smoke.
     There are four different groups, of which three are smokers of different intensities.
     This means the non-smoking group should have a mean with a weighting of unity and the others a weighting of one-third.

       * Select emph{Contrasts} on the One-Way ANOVA dialogue box.

       * Enter 1.0 in the emph{Coefficients} textbox and then click the emph{Add} button.

       * Add the values -0.333, -0.333, and -0.334 to the emph{Coefficients} list.

          -INSERT IMAGE

       * Press Continue to close the emph{Contrasts} dialogue box.

       * Press OK on the One-Way ANOVA dialogue box to display the results in the output viewer.

          -INSERT IMAGE

Bivariate Correlation
.....................

Computes Pearsons correlation coefficient, defined as a value between -1 and +1 that indicates the degree of association between variables. A positive value means large values of one variable are associated with large values of the other and,likewise, small values of one variable are associated with small values of the other. A negative value indicates that large values of one variable are associated with small values of the other and vise-versa.

     Use this feature to investigate the correlation, if any, between ice cream sales and outside temperature.

       * Open a new data file.

       * Enter the following pairs of values listed in table x of the number of ice cream cones sold each day one summer at a specified store along with the corresponding daytime high temperature.

          Number of Cones Sold   Temperature (Fahrenheit)
          171.00   76.00
          161.00   71.00
          156.00   66.00
          151.00   61.00
          154.00   73.00
          143.00   61.00
          146.00   64.00
          157.00   69.00
          171.00   78.00
          171.00   78.00
          166.00   76.00
          168.00   76.00
          176.00   81.00
          181.00   83.00
          181.00   86.00
          144.00   60.00
          174.00   87.00
          177.00   89.00
          178.00   86.00
          186.00   91.00
          164.00   75.00
          161.00   74.00
          163.00   72.00
          149.00   69.00
          161.00   71.00
          155.00   74.00
          170.00   86.00
          179.00   91.00
          176.00   71.00
          165.00   82.00

          Select Analyze-> Bivariate Correlation, to bring up the emph{Bivariate Correlation} dialogue box.

          Select emph{Cones} and click the right arrow button to move it into the right-hand-side textbox.

          -INSERT IMAGE

          Repeat the same steps with the emph{Temperature} variable.

          Click OK to display the results in the output viewer.

          -INSERT IMAGE

Factor Analysis
...............

Helps identify the underlying variables, or factors, to explain correlations. Variables should be either interval or ratio, and not categorical. Note: PSPP assumes the data has a nearly bivariate normal distribution for each pair of variables and that observations are independent.

Two main statistic functions are available: emphExtraction and emphRotation (see fig x).

-INSERT IMAGE

Extraction

- INSERT IMAGE

table instead

Method

     The emphMethod button on the emphExtraction dialogue box enables you to choose the method of factor extraction. Options include emphPrincipal Components Analysis and emphPrincipal Axis Factoring.

     Principal Components Analysis

          Use when the correlation matrix is singular. This function assembles uncorrelated linear combinations of the observed variables such that each successive component accounts for a progressively smaller portion of the variance.

     Principal Axis Factoring

          An iterative procedure that extracts and replaces factors from the current correlation matrix with new estimates repeatedly, until the convergence criterion for extraction is satisfied.

     Analyse

     Choose either a correlation or covariance matrix.

     Display

          Display the unrotated factor solution and Scree plot.

     Unrotated Factor Solution

          Display the unrotated factor loadings, communalities, and the solution eigenvalues.

     Scree Plot

          A plot of the variance for each factor.

Extract

     Specify to keep factors whose eigenvalues exceed a specified factor above the mean eigenvalue, or choose a specific number of factors to keep.

     Maximum Iterations for Convergence

     Specify the maximum number of steps the algorithm can take to estimate the solution.

Rotation Dialogue Box

-INSERT IMAGE

method

     Choose the type of factor rotation method. Options include none, varimax, quartimax, and equimax.

     Varimax

          An orthogonal rotation of the factor axes which has the effect of differentiating the original variables by the extracted factor. This solution provides results that make it easier to identify each variable with a single factor.

     Quartimax
          An orthogonal rotation that minimizes the number of factors needed to explain each variable

     Equimax
          A combination of the varimax and quartimax rotations.

Display Rotated Solution

     Display the solution in this way if you have selected a rotation method.

     Maximum Iterations for Convergence

     Choose the maximum number of steps the algorithm can take to reach convergence. The default value is twenty-five.

     Perform factor analysis to determine the leading factors that drive people to purchase specific brands of bread.

       * Enter the data in figure x, or open file xxx. sav.

          -INSERT IMAGE

       * Select Analyze-> Factor Analysis to bring up emph{Factor Analysis} dialogue box.

       * Click the first variable, emph{Reputation}, and then press the right arrow button to move it into the emph{Variables} dialogue box.

          -INSERT IMAGE

       * Repeat with all the other variables until no more remain on the left side.

          -INSERT IMAGE

       * Click the Extraction button.

       * Select the emph{Principal Components Analysis} method.

       * Select the emph{Correlation matrix} option under emph{Analyse}.

       * Select emph{Unrotated factor solution} and emph{Scree plot} under emph{Display}.

       * Click emph{Continue} to close this dialogue box.

       * Select the emph{Rotations} button in the emph{Factor Analysis} dialogue box.

       * Select the emph{Varimax} option under emph{Method}.

       * Select emph{Display rotated solution}.

       * Click emph{Continue} to close the dialogue box.

       * Click the OK button to display the results in the output viewer.

          -INSERT IMAGE

Relibility
..........

Estimate the internal consistency reliability. Options include Split-half reliability and Chronbach's Alpha.

- INSERT IMAGE

Split-half Reliability

An estimation based on the correlation of two equivalent forms of the scale. This is a three-step process: 1) Randomly divide all items that measure the same construct into two sets, 2) administer the whole instrument and divide the total score for each item in half, and 3) estimate the split-half reliability by calculating the correlation of these two sets.

Chronbach's Alpha

This estimation is equivalent to the average of all possible split-half estimates, and is an indication of the correlation among the variables.

     Examine the internal reliability of the following pass-fail test data, where zero represents fail and one pass.

     -INSERT IMAGE

       * Enter the test data into a new data file, or open the file xxx.sav.

       * Select Analyze-> Reliability.

       * Click the first variable and select the right arrow to move it into the epph{Items} textbox.

          -INSERT IMAGE

       * Repeat with the other variables until they are all listed in the emph{Items} text box.

       * Click OK to display the results. In this instance, Cronbachs Alpha is 0.61 indicating the internal consistency is questionable.

          -INSERT IMAGE

Non-Parametric Statistics
.........................

Provides Binomial statistics and Chi-Square for an arbitrary distribution of data.  Tests the differences between the observed and expected distribution of a sample, and can also test the difference between two or more samples.

Binomial

Compare the observed frequencies of dichotomous data to the expected values from the binomial distribution. The primary purpose of this test is to observe if the number of outcomes for each variable differs, e.g., you can verify a fair coin by comparing the frequency of heads and tails in several coin tosses.

     The following table indicates the temperatures at which customers ordered their gourmet drinks on a midsummer's day; available menu options included ice-cold, luke-warm, warm, or steaming-hot.
     The first column, emph{HotCold}is a dichotomous variable with a value of zero for ice-cold drinks and unity otherwise.
     The next column, emph{Range} varies from 0 to 3 depending upon temperature rangeof the drink, where 0=cold, 1=luke-warm, 2=warm, and 3= hot.

     HotCold   Range)

     0     0
     0     0
     1     2
     1     2
     0     0
     1     1
     1     1
     1     1
     1     2
     1     1
     1     3
     1     3
     1     2
     0     0
     0     0
     0     0
     1     1
     0     0
     0     0
     1     2
     1     2
     0     0
     1     3
     0     0

     Start by examining the data in the first column; emph{HotCold}.

       and Copy table x.x into a data file, or open xxx.sav.

       and Select Analyze->Non-Parametric Statistics->Binomial.

       and Select emph{HotCold} and click the right arrow button  to place it in the emph{Test Variable List} textbox.

       and Verify emph{Test proportion} has the value 0.5.

       and Verify that you have emph{Get from data} selected under emph{Define Dichotomy}.

          -INSERT IMAGE

       and Click OK to display the results in the output viewer.

          -INSERT IMAGE

     Next, examine the variable emph{Range}.

       * Select Analyze->Non-Parametric Statistics->Chi-Square.

       * Select the emph{Range} variable, and then click the right arrow to place it into the emph{Test Variable List} textbox.

          -INSERT IMAGE

       * Verify that emph{All categories equal} is selected under emph{Expected Values}.

       * Verify that the emph{Get from data} option under emph{Expected Range} is selected.

       * Click OK to display the results in the output viewer.

     -INSERT IMAGE

ROC Curve

ROC Curve
.........

Use to analyze binary classification systems. Examples of binary classification schemes include passing or failing newly made items during an inspection, and labeling patients to be either with or without a medical problem. The Roc Curve function returns an ROC curve with the option to display a diagonal reference line, standard error and confidence interval, as well as all coordinate points.

-INSERT IMAGE

Test Variable

Continuous numerical data holding the test results.

State Variable

Indicates which category is positive.

Display

Gives options for the output viewer including:

  * ROC curve with or without a diagonal reference line

  * Display standard error and confidence interval

  * Display coordinate points of the ROC curve

Display ROC Curve

     Produce a plot of one classification rate from a binary classification scheme versus the other as the criterion changes, e.g., you can plot the true positive rate versus the false positive rate for a disease as the threshold value between the two classifications varies.

Display Diagonal Reference Line

     Include a diagonal reference line in the plot. An ROC curve that coincides with this line indicates the distribution of each classification group is similar.

Display Standard Error and Confidence Interval
     Show the standard error, confidence interval, and area in a separate table in the output viewer. The area ranges in value from 0 to 1, where 1 indicates the distribution of each classification group does not overlap and 0.5 means both distributions are the same.

     Make an ROC curve of the following medical test data describing the dependence of a disease with age. The emph{age} variable holds the patients ages and the corresponding emph{disease}column is either 0 indicating a negative diagnosis or 1 otherwise.

     -INSERT IMAGE

       * Open the file xxx.sav.

       * Select Analyze-> ROC Curve.

       * Select emph{Age} from the list of variables on the left side of the dialogue box, and click the upper right arrow button to move it under  emph{Test Variable}.

       * Select emph{Disease} and click the lower right arrow button to move it into the emph{State Variable} box.

       * Select all the check boxes under emph{Display}.

       * Enter the number 1 in the emph{Value of state variable} box.

          -INSERT IMAGE

       * Click OK to display the ROC curve and accompanying tables in the output viewer.

          -INSERT IMAGE

Utilities
---------

Variables
.........

View variable properties and/or go-to it in the data editor window. Properties include variable name and label, Data format, user-missing values, measurement level, and value labels.

For a definition of each variable property, please refer to needNode.

       * Select Utilities-> Variables to bring up the emph{Variables} dialogue box.

       * Select a variable from the list in the left column to view its properties on the right side of the dialogue box.

     -INSERT IMAGE

Data File Comments
..................

This feature enables you to add comments to a data file.

Display Comments in Output

Display comments in the output viewer.

Reset

Clears the current comment.

-INSERT IMAGE

Windows
-------

Minimize all Windows
....................

Collapse all windows.  Click the PSPP icon on the tool bar to open them again.

Split
.....

Split the current data editor window (see figure x).

-INSERT IMAGE

Toolbar
-------

PSPP provides a tool bar across the top with short cuts to more commonly used menu commands.

-INSERT IMAGE